[ { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from head where age > 56" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , born_state , age from head order by age asc" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select creation , name , budget_in_billions from department" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( budget_in_billions ) , min ( budget_in_billions ) from department" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect avg ( _ ) from _ where _ between _ and _ | select avg ( num_employees ) from department where ranking between 10 and 15" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select name from head where born_state != 'California'" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect distinct _ from _ where _ | 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'" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select born_state from head group by born_state having count ( * ) >= 3" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select creation from department group by creation order by count ( * ) desc limit 1" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select department.name , department.num_employees from department join management on department.department_id = management.department_id where management.temporary_acting = 'Yes'" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct temporary_acting ) from management" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from department where department_id not in ( select department_id from management )" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct head.age from management join head on head.head_id = management.head_id where management.temporary_acting = 'Yes'" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | 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'" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | 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" }, { "db_id": "department_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ like _ | select head_id , name from head where name like '%Ha%'" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from farm" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from farm" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select total_horses from farm order by total_horses asc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select total_horses from farm order by total_horses asc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select hosts from farm_competition where theme != 'Aliens'" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select hosts from farm_competition where theme != 'Aliens'" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select theme from farm_competition order by year asc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select theme from farm_competition order by year asc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( working_horses ) from farm where total_horses > 5000" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( working_horses ) from farm where total_horses > 5000" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( cows ) , min ( cows ) from farm" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( cows ) , min ( cows ) from farm" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct status ) from city" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct status ) from city" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc | select official_name from city order by population desc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc | select official_name from city order by population desc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select official_name , status from city order by population desc limit 1" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select official_name , status from city order by population desc limit 1" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select farm_competition.year , city.official_name from city join farm_competition on city.city_id = farm_competition.host_city_id" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select farm_competition.year , city.official_name from city join farm_competition on city.city_id = farm_competition.host_city_id" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | 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" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | 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" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | 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" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | 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" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select farm_competition.theme from city join farm_competition on city.city_id = farm_competition.host_city_id where city.population > 1000" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select farm_competition.theme from city join farm_competition on city.city_id = farm_competition.host_city_id where city.population > 1000" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select status , avg ( population ) from city group by status" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select status , avg ( population ) from city group by status" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc | select status from city group by status order by count ( * ) asc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc | select status from city group by status order by count ( * ) asc" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select status from city group by status order by count ( * ) desc limit 1" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select status from city group by status order by count ( * ) desc limit 1" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select official_name from city where city_id not in ( select host_city_id from farm_competition )" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select official_name from city where city_id not in ( select host_city_id from farm_competition )" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select status from city where population > 1500 intersect select status from city where population < 500" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select status from city where population > 1500 intersect select status from city where population < 500" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select official_name from city where population > 1500 or population < 500" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select official_name from city where population > 1500 or population < 500" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select census_ranking from city where status != 'Village'" }, { "db_id": "farm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select census_ranking from city where status != 'Village'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select student_id from student_course_registrations group by student_id order by count ( * ) asc limit 1" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select student_id from student_course_registrations group by student_id order by count ( * ) asc limit 1" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select people.first_name , people.last_name from candidates join people on candidates.candidate_id = people.person_id" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select people.first_name , people.last_name from candidates join people on candidates.candidate_id = people.person_id" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select student_id from students where student_id not in ( select student_id from student_course_attendance )" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select student_id from students where student_id not in ( select student_id from student_course_attendance )" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select student_id from student_course_attendance" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select student_id from student_course_attendance" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ | select student_course_registrations.student_id , courses.course_name from student_course_registrations join courses on student_course_registrations.course_id = courses.course_id" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where courses.course_name = 'English'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where courses.course_name = 'English'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where student_course_attendance.student_id = 171" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where student_course_attendance.student_id = 171" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select candidates.candidate_id from people join candidates on people.person_id = candidates.candidate_id where people.email_address = 'stanley.monahan@example.org'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select candidates.candidate_id from people join candidates on people.person_id = candidates.candidate_id where people.email_address = 'stanley.monahan@example.org'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select candidate_id from candidate_assessments order by assessment_date desc limit 1" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select candidate_id from candidate_assessments order by assessment_date desc limit 1" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select candidate_id from candidate_assessments where asessment_outcome_code = 'Pass'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select candidate_id from candidate_assessments where asessment_outcome_code = 'Pass'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | 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'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | 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'" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select student_id from student_course_attendance where course_id = 301" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ | select student_id from student_course_attendance where course_id = 301" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select student_id from student_course_attendance where course_id = 301 order by date_of_attendance desc limit 1" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select student_id from student_course_attendance where course_id = 301 order by date_of_attendance desc limit 1" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect distinct _ from _ | select distinct addresses.city from addresses join people_addresses on addresses.address_id = people_addresses.address_id" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect distinct _ from _ | select distinct addresses.city from addresses join people_addresses on addresses.address_id = people_addresses.address_id" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect distinct _ from _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect distinct _ from _ | 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" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select course_name from courses order by course_name asc" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select course_name from courses order by course_name asc" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select first_name from people order by first_name asc" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ order by _ asc | select first_name from people order by first_name asc" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert 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 | \n\n### Response:\n\nselect _ from _ union select _ from _ | select student_id from student_course_registrations union select student_id from student_course_attendance" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the students who either registered or 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 | \n\n### Response:\n\nselect _ from _ union select _ from _ | select student_id from student_course_registrations union select student_id from student_course_attendance" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of courses which are registered or attended by student whose id is 121? | 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 | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select course_id from student_course_registrations where student_id = 121 union select course_id from student_course_attendance where student_id = 121" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the courses that are registered or attended by the student whose id is 121? | 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 | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select course_id from student_course_registrations where student_id = 121 union select course_id from student_course_attendance where student_id = 121" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all info of students who registered courses but not 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 | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select * from student_course_registrations where student_id not in ( select student_id from student_course_attendance )" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all details of the students who registered but did not attend any 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 | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select * from student_course_registrations where student_id not in ( select student_id from student_course_attendance )" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the id of students who registered course statistics in the order of registration date. | 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 | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select student_course_registrations.student_id from courses join student_course_registrations on courses.course_id = student_course_registrations.course_id where courses.course_name = 'statistics' order by student_course_registrations.registration_date asc" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the students who registered course statistics by order of registration date? | 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 | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select student_course_registrations.student_id from courses join student_course_registrations on courses.course_id = student_course_registrations.course_id where courses.course_name = 'statistics' order by student_course_registrations.registration_date asc" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the id of students who attended statistics courses in the order of attendance date. | 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 | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select student_course_attendance.student_id from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where courses.course_name = 'statistics' order by student_course_attendance.date_of_attendance asc" }, { "db_id": "student_assessment", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the students who attended courses in the statistics department in order of attendance date. | 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 | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select student_course_attendance.student_id from courses join student_course_attendance on courses.course_id = student_course_attendance.course_id where courses.course_name = 'statistics' order by student_course_attendance.date_of_attendance asc" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the dates when the max temperature was higher than 85. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select date from weather where max_temperature_f > 85" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates with a maximum temperature higher than 85? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select date from weather where max_temperature_f > 85" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of stations that have latitude lower than 37.5? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select name from station where lat < 37.5" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all stations with a latitude smaller than 37.5? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select name from station where lat < 37.5" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each city, return the highest latitude among its stations. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select city , max ( lat ) from station group by city" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each city, what is the highest latitude for its stations? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select city , max ( lat ) from station group by city" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the start station and end station for the trips with the three oldest id. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select start_station_name , end_station_name from trip order by id asc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the station station and end station for the trips with the three smallest ids? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select start_station_name , end_station_name from trip order by id asc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average latitude and longitude of stations located in San Jose city? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( lat ) , avg ( long ) from station where city = 'San Jose'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average latitude and longitude in San Jose? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( lat ) , avg ( long ) from station where city = 'San Jose'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the trip that has the shortest duration? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select id from trip order by duration asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the shortest trip? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select id from trip order by duration asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total and maximum duration of trips with bike id 636? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect sum ( _ ) , max ( _ ) from _ where _ | select sum ( duration ) , max ( duration ) from trip where bike_id = 636" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total and maximum duration for all trips with the bike id 636? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect sum ( _ ) , max ( _ ) from _ where _ | select sum ( duration ) , max ( duration ) from trip where bike_id = 636" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each zip code, return the average mean temperature of August there. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ where _ like _ group by _ | select zip_code , avg ( mean_temperature_f ) from weather where date like '8/%' group by zip_code" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each zip code, what is the average mean temperature for all dates that start with '8'? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ where _ like _ group by _ | select zip_code , avg ( mean_temperature_f ) from weather where date like '8/%' group by zip_code" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: From the trip record, find the number of unique bikes. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct bike_id ) from trip" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different bike ids are there? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct bike_id ) from trip" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of distinct cities the stations are located at? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from station" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different cities have these stations? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from station" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many stations does Mountain View city has? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from station where city = 'Mountain View'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many stations are in Mountain View? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from station where city = 'Mountain View'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the unique name for stations that have ever had 7 bikes available. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct station.name from station join status on station.id = status.station_id where status.bikes_available = 7" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names for each station that has ever had 7 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct station.name from station join status on station.id = status.station_id where status.bikes_available = 7" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which start station had the most trips starting from August? Give me the name and id of the station. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ like _ group by _ order by count ( _ ) desc limit _ | select start_station_name , start_station_id from trip where start_date like '8/%' group by start_station_name order by count ( * ) desc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the start station's name and id for the one that had the most start trips in August? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ like _ group by _ order by count ( _ ) desc limit _ | select start_station_name , start_station_id from trip where start_date like '8/%' group by start_station_name order by count ( * ) desc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which bike traveled the most often in zip code 94002? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select bike_id from trip where zip_code = 94002 group by bike_id order by count ( * ) desc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the bike that traveled the most in 94002? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select bike_id from trip where zip_code = 94002 group by bike_id order by count ( * ) desc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many days had both mean humidity above 50 and mean visibility above 8? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from weather where mean_humidity > 50 and mean_visibility_miles > 8" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of days that had an average humity above 50 and an average visibility above 8? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from weather where mean_humidity > 50 and mean_visibility_miles > 8" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the latitude, longitude, city of the station from which the shortest trip started? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select station.lat , station.long , station.city from station join trip on station.id = trip.start_station_id order by trip.duration asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the latitude, longitude, and city of the station from which the trip with smallest duration started? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select station.lat , station.long , station.city from station join trip on station.id = trip.start_station_id order by trip.duration asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of stations that are located in San Francisco and have average bike availability above 10. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ group by _ having avg ( _ ) > _ | select id from station where city = 'San Francisco' intersect select station_id from status group by station_id having avg ( bikes_available ) > 10" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the stations in San Francisco that normally have more than 10 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ group by _ having avg ( _ ) > _ | select id from station where city = 'San Francisco' intersect select station_id from status group by station_id having avg ( bikes_available ) > 10" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of stations that had more than 14 bikes available on average or were installed in December? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ union select _ from _ where _ like _ | select station.name , station.id from station join status on station.id = status.station_id group by status.station_id having avg ( status.bikes_available ) > 14 union select name , id from station where installation_date like '12/%'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ union select _ from _ where _ like _ | select station.name , station.id from station join status on station.id = status.station_id group by status.station_id having avg ( status.bikes_available ) > 14 union select name , id from station where installation_date like '12/%'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the 3 most common cloud cover rates in the region of zip code 94107? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select cloud_cover from weather where zip_code = 94107 group by cloud_cover order by count ( * ) desc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the 3 most common cloud covers in the zip code of 94107? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select cloud_cover from weather where zip_code = 94107 group by cloud_cover order by count ( * ) desc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the zip code in which the average mean sea level pressure is the lowest? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) asc limit _ | select zip_code from weather group by zip_code order by avg ( mean_sea_level_pressure_inches ) asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the zip code that has the lowest average mean sea level pressure? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) asc limit _ | select zip_code from weather group by zip_code order by avg ( mean_sea_level_pressure_inches ) asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average bike availability in stations that are not located in Palo Alto? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ where _ ) | select avg ( bikes_available ) from status where station_id not in ( select id from station where city = 'Palo Alto' )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average bike availablility for stations not in Palo Alto? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ where _ ) | select avg ( bikes_available ) from status where station_id not in ( select id from station where city = 'Palo Alto' )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average longitude of stations that never had bike availability more than 10? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ group by _ having max ( _ ) > _ ) | select avg ( long ) from station where id not in ( select station_id from status group by station_id having max ( bikes_available ) > 10 )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the mean longitude for all stations that have never had more than 10 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ group by _ having max ( _ ) > _ ) | select avg ( long ) from station where id not in ( select station_id from status group by station_id having max ( bikes_available ) > 10 )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When and in what zip code did max temperature reach 80? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select date , zip_code from weather where max_temperature_f >= 80" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select date , zip_code from weather where max_temperature_f >= 80" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me ids for all the trip that took place in a zip code area with average mean temperature above 60. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ | select trip.id from trip join weather on trip.zip_code = weather.zip_code group by weather.zip_code having avg ( weather.mean_temperature_f ) > 60" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each zip code, find the ids of all trips that have a higher average mean temperature above 60? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ | select trip.id from trip join weather on trip.zip_code = weather.zip_code group by weather.zip_code having avg ( weather.mean_temperature_f ) > 60" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each zip code, return how many times max wind speed reached 25? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select zip_code , count ( * ) from weather where max_wind_speed_mph >= 25 group by zip_code" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each zip code, how many times has the maximum wind speed reached 25 mph? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select zip_code , count ( * ) from weather where max_wind_speed_mph >= 25 group by zip_code" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On which day and in which zip code was the min dew point lower than any day in zip code 94107? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select date , zip_code from weather where min_dew_point_f < ( select min ( min_dew_point_f ) from weather where zip_code = 94107 )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select date , zip_code from weather where min_dew_point_f < ( select min ( min_dew_point_f ) from weather where zip_code = 94107 )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each trip, return its ending station's installation date. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ | select trip.id , station.installation_date from trip join station on trip.end_station_id = station.id" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the installation date for each ending station on all the trips? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ | select trip.id , station.installation_date from trip join station on trip.end_station_id = station.id" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which trip started from the station with the largest dock count? Give me the trip id. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select trip.id from trip join station on trip.start_station_id = station.id order by station.dock_count desc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the trip that started from the station with the highest dock count? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select trip.id from trip join station on trip.start_station_id = station.id order by station.dock_count desc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of trips that did not end in San Francisco city. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from trip join station on trip.end_station_id = station.id where station.city != 'San Francisco'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many trips did not end in San Francisco? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from trip join station on trip.end_station_id = station.id where station.city != 'San Francisco'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In zip code 94107, on which day neither Fog nor Rain was not observed? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select date from weather where zip_code = 94107 and events != 'Fog' and events != 'Rain'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On which day has it neither been foggy nor rained in the zip code of 94107? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select date from weather where zip_code = 94107 and events != 'Fog' and events != 'Rain'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of stations that have latitude above 37.4 and never had bike availability below 7? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ group by _ having min ( _ ) < _ | select id from station where lat > 37.4 except select station_id from status group by station_id having min ( bikes_available ) < 7" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ group by _ having min ( _ ) < _ | select id from station where lat > 37.4 except select station_id from status group by station_id having min ( bikes_available ) < 7" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are names of stations that have average bike availability above 10 and are not located in San Jose city? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ except select _ from _ where _ | select station.name from station join status on station.id = status.station_id group by status.station_id having avg ( bikes_available ) > 10 except select name from station where city = 'San Jose'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all stations that have more than 10 bikes available and are not located in San Jose? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ except select _ from _ where _ | select station.name from station join status on station.id = status.station_id group by status.station_id having avg ( bikes_available ) > 10 except select name from station where city = 'San Jose'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name, latitude, and city of the station with the lowest latitude? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , lat , city from station order by lat asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, latitude, and city of the station that is located the furthest South? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , lat , city from station order by lat asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select date , mean_temperature_f , mean_humidity from weather order by max_gust_speed_mph desc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select date , mean_temperature_f , mean_humidity from weather order by max_gust_speed_mph desc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and the number of stations for all the cities that have at least 15 stations. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) >= _ | select city , count ( * ) from station group by city having count ( * ) >= 15" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of every city that has at least 15 stations and how many stations does it have? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) >= _ | select city , count ( * ) from station group by city having count ( * ) >= 15" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids and names of stations from which at least 200 trips started. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select start_station_id , start_station_name from trip group by start_station_name having count ( * ) >= 200" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of all start stations that were the beginning of at least 200 trips? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select start_station_id , start_station_name from trip group by start_station_name having count ( * ) >= 200" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the zip code in which the average mean visibility is lower than 10. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) < _ | select zip_code from weather group by zip_code having avg ( mean_visibility_miles ) < 10" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each zip code, select all those that have an average mean visiblity below 10. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) < _ | select zip_code from weather group by zip_code having avg ( mean_visibility_miles ) < 10" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the cities in a decreasing order of each city's stations' highest latitude. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ order by max ( _ ) desc | select city from station group by city order by max ( lat ) desc" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each city, list their names in decreasing order by their highest station latitude. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ order by max ( _ ) desc | select city from station group by city order by max ( lat ) desc" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select date , cloud_cover from weather order by cloud_cover desc limit 5" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates that have the 5 highest cloud cover rates and what are the rates? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select date , cloud_cover from weather order by cloud_cover desc limit 5" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and durations of the trips with the top 3 durations? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select id , duration from trip order by duration desc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the trips that lasted the longest and how long did they last? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select id , duration from trip order by duration desc limit 3" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each station, return its longitude and the average duration of trips that started from the station. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select station.name , station.long , avg ( trip.duration ) from station join trip on station.id = trip.start_station_id group by trip.start_station_id" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each start station id, what is its name, longitude and average duration of trips started there? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select station.name , station.long , avg ( trip.duration ) from station join trip on station.id = trip.start_station_id group by trip.start_station_id" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each station, find its latitude and the minimum duration of trips that ended at the station. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select station.name , station.lat , min ( trip.duration ) from station join trip on station.id = trip.end_station_id group by trip.end_station_id" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each end station id, what is its name, latitude, and minimum duration for trips ended there? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select station.name , station.lat , min ( trip.duration ) from station join trip on station.id = trip.end_station_id group by trip.end_station_id" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the distinct stations from which a trip of duration below 100 started. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct start_station_name from trip where duration < 100" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the different start station names for a trip that lasted less than 100? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct start_station_name from trip where duration < 100" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the zip codes in which the max dew point have never reached 70. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ where _ | select distinct zip_code from weather except select distinct zip_code from weather where max_dew_point_f >= 70" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the different zip codes that have a maximum dew point that was always below 70? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ where _ | select distinct zip_code from weather except select distinct zip_code from weather where max_dew_point_f >= 70" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ >= ( select avg ( _ ) from _ where _ ) | select id from trip where duration >= ( select avg ( duration ) from trip where zip_code = 94103 )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ >= ( select avg ( _ ) from _ where _ ) | select id from trip where duration >= ( select avg ( duration ) from trip where zip_code = 94103 )" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates in which the mean sea level pressure was between 30.3 and 31? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select date from weather where mean_sea_level_pressure_inches between 30.3 and 31" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates that have an average sea level pressure between 30.3 and 31? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select date from weather where mean_sea_level_pressure_inches between 30.3 and 31" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ - _ from _ order by _ - _ asc limit _ | select date , max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the days that had the smallest temperature range, and what was that range? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ - _ from _ order by _ - _ asc limit _ | select date , max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f asc limit 1" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and name of the stations that have ever had more than 12 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct station.id , station.name from station join status on station.id = status.station_id where status.bikes_available > 12" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different ids and names of the stations that have had more than 12 bikes available? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct station.id , station.name from station join status on station.id = status.station_id where status.bikes_available > 12" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place. | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) < _ intersect select _ from _ group by _ having count ( _ ) >= _ | select zip_code from weather group by zip_code having avg ( mean_humidity ) < 70 intersect select zip_code from trip group by zip_code having count ( * ) >= 100" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) < _ intersect select _ from _ group by _ having count ( _ ) >= _ | select zip_code from weather group by zip_code having avg ( mean_humidity ) < 70 intersect select zip_code from trip group by zip_code having count ( * ) >= 100" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ group by _ having count ( _ ) > _ | select name from station where city = 'Palo Alto' except select end_station_name from trip group by end_station_name having count ( * ) > 100" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ group by _ having count ( _ ) > _ | select name from station where city = 'Palo Alto' except select end_station_name from trip group by end_station_name having count ( * ) > 100" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many trips started from Mountain View city and ended at Palo Alto city? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ and _ where _ | select count ( * ) from station join trip join station join trip on station.id = trip.start_station_id and trip.id = trip.id and station.id = trip.end_station_id where station.city = 'Mountain View' and station.city = 'Palo Alto'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many trips stated from a station in Mountain View and ended at one in Palo Alto? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ and _ where _ | select count ( * ) from station join trip join station join trip on station.id = trip.start_station_id and trip.id = trip.id and station.id = trip.end_station_id where station.city = 'Mountain View' and station.city = 'Palo Alto'" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average latitude and longitude of the starting points of all trips? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ | select avg ( station.lat ) , avg ( station.long ) from station join trip on station.id = trip.start_station_id" }, { "db_id": "bike_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average latitude and longitude of all starting stations for the trips? | station : id , name , lat , long , dock_count , city , installation_date | status : station_id , bikes_available , docks_available , time | trip : id , duration , start_date , start_station_name , start_station_id , end_date , end_station_name , end_station_id , bike_id , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ | select avg ( station.lat ) , avg ( station.long ) from station join trip on station.id = trip.start_station_id" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many books are there? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from book" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the writers of the books in ascending alphabetical order. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select writer from book order by writer asc" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the titles of the books in ascending order of issues. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select title from book order by issues asc" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of the books whose writer is not \"Elaine Lee\"? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ where _ | select title from book where writer != 'Elaine Lee'" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the title and issues of the books? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ | select title , issues from book" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of publications in descending order of price? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select publication_date from publication order by price desc" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct publishers of publications with price higher than 5000000? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct publisher from publication where price > 5000000" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the publisher of the publication with the highest price. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select publisher from publication order by price desc limit 1" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the publication dates of publications with 3 lowest prices. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select publication_date from publication order by price asc limit 3" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the title and publication dates of books. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ | select book.title , publication.publication_date from book join publication on book.book_id = publication.book_id" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show writers who have published a book with price more than 4000000. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ where _ | select book.writer from book join publication on book.book_id = publication.book_id where publication.price > 4000000" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the titles of books in descending order of publication price. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select book.title from book join publication on book.book_id = publication.book_id order by publication.price desc" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show publishers that have more than one publication. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select publisher from publication group by publisher having count ( * ) > 1" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different publishers together with the number of publications they have. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select publisher , count ( * ) from publication group by publisher" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the most common publication date. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select publication_date from publication group by publication_date order by count ( * ) desc limit 1" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the writers who have written more than one book. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select writer from book group by writer having count ( * ) > 1" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the titles of books that are not published. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from book where book_id not in ( select book_id from publication )" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select publisher from publication where price > 10000000 intersect select publisher from publication where price < 5000000" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of distinct publication dates? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct publication_date ) from publication" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct publication dates are there in our record? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct publication_date ) from publication" }, { "db_id": "book_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the prices of publications whose publisher is either \"Person\" or \"Wiley\" | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | \n\n### Response:\n\nselect _ from _ where _ | select price from publication where publisher = 'Person' or publisher = 'Wiley'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many actors are there? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from actor" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from actor" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of actors in ascending alphabetical order. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from actor order by name asc" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of actors, ordered alphabetically? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from actor order by name asc" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the characters and duration of actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ | select character , duration from actor" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the characters and durations for each actor. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ | select character , duration from actor" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of actors whose age is not 20. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select name from actor where age != 20" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of actors who are not 20 years old? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select name from actor where age != 20" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the characters of actors in descending order of age? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select character from actor order by age desc" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the characters for actors, ordered by age descending. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select character from actor order by age desc" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the duration of the oldest actor? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select duration from actor order by age desc limit 1" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the duration of the actor with the greatest age. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select duration from actor order by age desc limit 1" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of musicals with nominee \"Bob Fosse\"? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select name from musical where nominee = 'Bob Fosse'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of musicals who have the nominee Bob Fosse. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select name from musical where nominee = 'Bob Fosse'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct nominees of the musicals with the award that is not \"Tony Award\"? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct nominee from musical where award != 'Tony Award'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the different nominees of musicals that have an award that is not the Tony Award. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct nominee from musical where award != 'Tony Award'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of actors and names of musicals they are in. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ | select actor.name , musical.name from actor join musical on actor.musical_id = musical.musical_id" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of actors and the musicals that they are in? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ | select actor.name , musical.name from actor join musical on actor.musical_id = musical.musical_id" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of actors that have appeared in musical with name \"The Phantom of the Opera\". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select actor.name from actor join musical on actor.musical_id = musical.musical_id where musical.name = 'The Phantom of the Opera'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of actors who have been in the musical titled The Phantom of the Opera? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select actor.name from actor join musical on actor.musical_id = musical.musical_id where musical.name = 'The Phantom of the Opera'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of actors in descending order of the year their musical is awarded. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select actor.name from actor join musical on actor.musical_id = musical.musical_id order by musical.year desc" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of actors ordered descending by the year in which their musical was awarded? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select actor.name from actor join musical on actor.musical_id = musical.musical_id order by musical.year desc" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of musicals and the number of actors who have appeared in the musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select musical.name , count ( * ) from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many actors have appeared in each musical? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select musical.name , count ( * ) from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of musicals which have at least three actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select musical.name from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id having count ( * ) >= 3" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of musicals who have at 3 or more actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select musical.name from actor join musical on actor.musical_id = musical.musical_id group by actor.musical_id having count ( * ) >= 3" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different nominees and the number of musicals they have been nominated. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select nominee , count ( * ) from musical group by nominee" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many musicals has each nominee been nominated for? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select nominee , count ( * ) from musical group by nominee" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the nominee who has been nominated the greatest number of times. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nominee from musical group by nominee order by count ( * ) desc limit 1" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the nominee who has been nominated for the most musicals? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nominee from musical group by nominee order by count ( * ) desc limit 1" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the most common result of the musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select result from musical group by result order by count ( * ) desc limit 1" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the most frequent result across all musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select result from musical group by result order by count ( * ) desc limit 1" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the nominees that have been nominated more than two musicals. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select nominee from musical group by nominee having count ( * ) > 2" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the nominees who have been nominated more than two times? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select nominee from musical group by nominee having count ( * ) > 2" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of musicals that do not have actors. | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from musical where musical_id not in ( select musical_id from actor )" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of musicals who have no actors? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from musical where musical_id not in ( select musical_id from actor )" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the nominees that have nominated musicals for both \"Tony Award\" and \"Drama Desk Award\". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select nominee from musical where award = 'Tony Award' intersect select nominee from musical where award = 'Drama Desk Award'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select nominee from musical where award = 'Tony Award' intersect select nominee from musical where award = 'Drama Desk Award'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the musical nominee with award \"Bob Fosse\" or \"Cleavant Derricks\". | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select nominee from musical where award = 'Tony Award' or award = 'Cleavant Derricks'" }, { "db_id": "musical", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards? | musical : musical_id , name , year , award , category , nominee , result | actor : actor_id , name , musical_id , character , duration , age | actor.musical_id = actor.actor_id | \n\n### Response:\n\nselect _ from _ where _ | select nominee from musical where award = 'Tony Award' or award = 'Cleavant Derricks'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the emails of the user named \"Mary\". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ | select email from user_profiles where name = 'Mary'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the partition id of the user named \"Iron Man\". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ | select partitionid from user_profiles where name = 'Iron Man'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many users are there? | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from user_profiles" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many followers does each user have? | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from follows" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of followers for each user. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect count ( _ ) from _ group by _ | select count ( * ) from follows group by f1" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of tweets in record. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from tweets" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of users who posted some tweets. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct uid ) from tweets" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and email of the user whose name contains the word 'Swift'. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ like _ | select name , email from user_profiles where name like '%Swift%'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of users whose emails contain 'superstar' or 'edu'. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ like _ or _ like _ | select name from user_profiles where email like '%superstar%' or email like '%edu%'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the text of tweets about the topic 'intern'. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ like _ | select text from tweets where text like '%intern%'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and email of the users who have more than 1000 followers. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ | select name , email from user_profiles where followers > 1000" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the users whose number of followers is greater than that of the user named \"Tyler Swift\". | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > ( select count ( _ ) from _ where _ ) | select user_profiles.name from user_profiles join follows on user_profiles.uid = follows.f1 group by follows.f1 having count ( * ) > ( select count ( * ) from user_profiles join follows on user_profiles.uid = follows.f1 where user_profiles.name = 'Tyler Swift' )" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and email for the users who have more than one follower. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select user_profiles.name , user_profiles.email from user_profiles join follows on user_profiles.uid = follows.f1 group by follows.f1 having count ( * ) > 1" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of users who have more than one tweet. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select user_profiles.name from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid having count ( * ) > 1" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of users who are followed by Mary and Susan. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select follows.f1 from user_profiles join follows on user_profiles.uid = follows.f2 where user_profiles.name = 'Mary' intersect select follows.f1 from user_profiles join follows on user_profiles.uid = follows.f2 where user_profiles.name = 'Susan'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of users who are followed by Mary or Susan. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ where _ | select follows.f1 from user_profiles join follows on user_profiles.uid = follows.f2 where user_profiles.name = 'Mary' or user_profiles.name = 'Susan'" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the user who has the largest number of followers. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from user_profiles order by followers desc limit 1" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and email of the user followed by the least number of people. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , email from user_profiles order by followers asc limit 1" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and number of followers for each user, and sort the results by the number of followers in descending order. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , followers from user_profiles order by followers desc" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of 5 users followed by the largest number of other users. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from user_profiles order by followers desc limit 5" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the text of all tweets in the order of date. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ order by _ asc | select text from tweets order by createdate asc" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of each user and number of tweets tweeted by each of them. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select user_profiles.name , count ( * ) from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and partition id for users who tweeted less than twice. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) < _ | select user_profiles.name , user_profiles.partitionid from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid having count ( * ) < 2" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the user who tweeted more than once, and number of tweets tweeted by them. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select user_profiles.name , count ( * ) from user_profiles join tweets on user_profiles.uid = tweets.uid group by tweets.uid having count ( * ) > 1" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average number of followers for the users who do not have any tweet. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ ) | select avg ( followers ) from user_profiles where uid not in ( select uid from tweets )" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average number of followers for the users who had some tweets. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ in ( select _ from _ ) | select avg ( followers ) from user_profiles where uid in ( select uid from tweets )" }, { "db_id": "twitter_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum and total number of followers of all users. | follows : f1 , f2 | tweets : id , uid , text , createdate | user_profiles : uid , name , email , partitionid , followers | follows.f2 = user_profiles.uid | follows.f1 = user_profiles.uid | tweets.uid = user_profiles.uid | \n\n### Response:\n\nselect max ( _ ) , sum ( _ ) from _ | select max ( followers ) , sum ( followers ) from user_profiles" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all the catalog entries. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( catalog_entry_name ) from catalog_contents" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the catalog entry names? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( catalog_entry_name ) from catalog_contents" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the list of attribute data types possessed by more than 3 attribute definitions. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select attribute_data_type from attribute_definitions group by attribute_data_type having count ( * ) > 3" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the attribute data types with more than 3 attribute definitions? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select attribute_data_type from attribute_definitions group by attribute_data_type having count ( * ) > 3" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the attribute data type of the attribute with name \"Green\"? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select attribute_data_type from attribute_definitions where attribute_name = 'Green'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the attribute data type for the attribute named \"Green\". | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select attribute_data_type from attribute_definitions where attribute_name = 'Green'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and level of catalog structure with level between 5 and 10. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select catalog_level_name , catalog_level_number from catalog_structure where catalog_level_number between 5 and 10" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and level of catalog structure with level number between 5 and 10 | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select catalog_level_name , catalog_level_number from catalog_structure where catalog_level_number between 5 and 10" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the catalog publishers whose name contains \"Murray\" | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect distinct ( _ ) from _ where _ like _ | select distinct ( catalog_publisher ) from catalogs where catalog_publisher like '%Murray%'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which catalog publishers have substring \"Murray\" in their names? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect distinct ( _ ) from _ where _ like _ | select distinct ( catalog_publisher ) from catalogs where catalog_publisher like '%Murray%'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which catalog publisher has published the most catalogs? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select catalog_publisher from catalogs group by catalog_publisher order by count ( * ) desc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the catalog publisher that has the most catalogs. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select catalog_publisher from catalogs group by catalog_publisher order by count ( * ) desc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and publication dates of all catalogs that have catalog level number greater than 5. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalogs.catalog_name , catalogs.date_of_publication from catalogs join catalog_structure on catalogs.catalog_id = catalog_structure.catalog_id where catalog_level_number > 5" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and publication date of the catalogs with catalog level number above 5? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalogs.catalog_name , catalogs.date_of_publication from catalogs join catalog_structure on catalogs.catalog_id = catalog_structure.catalog_id where catalog_level_number > 5" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the entry names of catalog with the attribute possessed by most entries. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.attribute_value = ( select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count ( * ) desc limit 1 )" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the entry names of the catalog with the attribute that have the most entries. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.attribute_value = ( select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count ( * ) desc limit 1 )" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the entry name of the most expensive catalog (in USD)? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the entry name of the catalog with the highest price (in USD). | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the level name of the cheapest catalog (in USD)? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select catalog_structure.catalog_level_name from catalog_contents join catalog_structure on catalog_contents.catalog_level_number = catalog_structure.catalog_level_number order by catalog_contents.price_in_dollars asc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the level name of the catalog with the lowest price (in USD). | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select catalog_structure.catalog_level_name from catalog_contents join catalog_structure on catalog_contents.catalog_level_number = catalog_structure.catalog_level_number order by catalog_contents.price_in_dollars asc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average and minimum price (in Euro) of all products? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) from _ | select avg ( price_in_euros ) , min ( price_in_euros ) from catalog_contents" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the average and minimum price (in Euro) of the products. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) from _ | select avg ( price_in_euros ) , min ( price_in_euros ) from catalog_contents" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the product with the highest height? Give me the catalog entry name. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select catalog_entry_name from catalog_contents order by height desc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which catalog content has the highest height? Give me the catalog entry name. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select catalog_entry_name from catalog_contents order by height desc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the product that has the smallest capacity. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select catalog_entry_name from catalog_contents order by capacity asc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which catalog content has the smallest capacity? Return the catalog entry name. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select catalog_entry_name from catalog_contents order by capacity asc limit 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all the products whose stock number starts with \"2\". | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select catalog_entry_name from catalog_contents where product_stock_number like '2%'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which catalog contents have a product stock number that starts from \"2\"? Show the catalog entry names. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select catalog_entry_name from catalog_contents where product_stock_number like '2%'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of catalog entries with level number 8. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.catalog_level_number = '8'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of catalog entries with level number 8? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.catalog_level_number = '8'" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the products with length smaller than 3 or height greater than 5. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_entry_name from catalog_contents where length < 3 or width > 5" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which catalog contents have length below 3 or above 5? Find the catalog entry names. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_entry_name from catalog_contents where length < 3 or width > 5" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and attribute ID of the attribute definitions with attribute value 0. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select attribute_definitions.attribute_name , attribute_definitions.attribute_id from attribute_definitions join catalog_contents_additional_attributes on attribute_definitions.attribute_id = catalog_contents_additional_attributes.attribute_id where catalog_contents_additional_attributes.attribute_value = 0" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select attribute_definitions.attribute_name , attribute_definitions.attribute_id from attribute_definitions join catalog_contents_additional_attributes on attribute_definitions.attribute_id = catalog_contents_additional_attributes.attribute_id where catalog_contents_additional_attributes.attribute_value = 0" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and capacity of products with price greater than 700 (in USD). | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_entry_name , capacity from catalog_contents where price_in_dollars > 700" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_entry_name , capacity from catalog_contents where price_in_dollars > 700" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the dates on which more than one revisions were made. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select date_of_latest_revision from catalogs group by date_of_latest_revision having count ( * ) > 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On which days more than one revisions were made on catalogs. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select date_of_latest_revision from catalogs group by date_of_latest_revision having count ( * ) > 1" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are there in the records? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from catalog_contents" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of catalog contents. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from catalog_contents" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Name all the products with next entry ID greater than 8. | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_entry_name from catalog_contents where next_entry_id > 8" }, { "db_id": "product_catalog", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the catalog entry names of the products with next entry ID above 8? | attribute_definitions : attribute_id , attribute_name , attribute_data_type | catalogs : catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision | catalog_structure : catalog_level_number , catalog_id , catalog_level_name | catalog_contents : catalog_entry_id , catalog_level_number , parent_entry_id , previous_entry_id , next_entry_id , catalog_entry_name , product_stock_number , price_in_dollars , price_in_euros , price_in_pounds , capacity , length , height , width | catalog_contents_additional_attributes : catalog_entry_id , catalog_level_number , attribute_id , attribute_value | catalog_structure.catalog_id = catalogs.catalog_id | catalog_contents.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number | catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id | \n\n### Response:\n\nselect _ from _ where _ | select catalog_entry_name from catalog_contents where next_entry_id > 8" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many aircrafts do we have? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from aircraft" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many aircrafts exist in the database? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from aircraft" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show name and distance for all aircrafts. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ | select name , distance from aircraft" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and distances for all airplanes? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ | select name , distance from aircraft" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all aircrafts with more than 1000 distance. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select aid from aircraft where distance > 1000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all aircrafts that can cover a distance of more than 1000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select aid from aircraft where distance > 1000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many aircrafts have distance between 1000 and 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ where _ between _ and _ | select count ( * ) from aircraft where distance between 1000 and 5000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of aircrafts that have a distance between 1000 and 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ where _ between _ and _ | select count ( * ) from aircraft where distance between 1000 and 5000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and distance for aircraft with id 12? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select name , distance from aircraft where aid = 12" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and distance for the aircraft that has an id of 12? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select name , distance from aircraft where aid = 12" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the minimum, average, and maximum distance of all aircrafts. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( distance ) , avg ( distance ) , max ( distance ) from aircraft" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the minimum, average and maximum distances traveled across all aircrafts. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( distance ) , avg ( distance ) , max ( distance ) from aircraft" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id and name of the aircraft with the maximum distance. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select aid , name from aircraft order by distance desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and name of the aircraft that can cover the maximum distance? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select aid , name from aircraft order by distance desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of aircrafts with top three lowest distances. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from aircraft order by distance asc limit 3" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the aircrafts with top 3 shortest lengthes? List their names. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from aircraft order by distance asc limit 3" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all aircrafts with distances more than the average. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from aircraft where distance > ( select avg ( distance ) from aircraft )" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all aircrafts that can cover more distances than average? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from aircraft where distance > ( select avg ( distance ) from aircraft )" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees do we have? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from employee" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of employees? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from employee" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show name and salary for all employees sorted by salary. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , salary from employee order by salary asc" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and salary of all employees in order of salary? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , salary from employee order by salary asc" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all employees with at least 100000 salary. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select eid from employee where salary > 100000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of every employee who has at least a salary of 100000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select eid from employee where salary > 100000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees have salary between 100000 and 200000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ where _ between _ and _ | select count ( * ) from employee where salary between 100000 and 200000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of employees that have a salary between 100000 and 200000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ where _ between _ and _ | select count ( * ) from employee where salary between 100000 and 200000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and salary for employee with id 242518965? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select name , salary from employee where eid = 242518965" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and salary of the employee with the id 242518965? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select name , salary from employee where eid = 242518965" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is average and maximum salary of all employees. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ | select avg ( salary ) , max ( salary ) from employee" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and largest salary of all employees? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ | select avg ( salary ) , max ( salary ) from employee" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id and name of the employee with maximum salary. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select eid , name from employee order by salary desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and name of the employee with the highest salary? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select eid , name from employee order by salary desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of employees with three lowest salaries. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from employee order by salary asc limit 3" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the 3 employees who get paid the least? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from employee order by salary asc limit 3" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all employees with salary more than the average. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from employee where salary > ( select avg ( salary ) from employee )" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all employees who have a salary higher than average? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from employee where salary > ( select avg ( salary ) from employee )" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id and salary of Mark Young. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select eid , salary from employee where name = 'Mark Young'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and salary of the employee named Mark Young? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select eid , salary from employee where name = 'Mark Young'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many flights do we have? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from flight" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from flight" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show flight number, origin, destination of all flights in the alphabetical order of the departure cities. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc | select flno , origin , destination from flight order by origin asc" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the flight number, origin, and destination for all flights in alphabetical order by departure cities? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc | select flno , origin , destination from flight order by origin asc" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all flight number from Los Angeles. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select flno from flight where origin = 'Los Angeles'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the numbers of all flights coming from Los Angeles? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select flno from flight where origin = 'Los Angeles'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show origins of all flights with destination Honolulu. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select origin from flight where destination = 'Honolulu'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the origins of all flights that are headed to Honolulu? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select origin from flight where destination = 'Honolulu'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show me the departure date and arrival date for all flights from Los Angeles to Honolulu. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select departure_date , arrival_date from flight where origin = 'Los Angeles' and destination = 'Honolulu'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the departure and arrival dates of all flights from LA to Honolulu? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select departure_date , arrival_date from flight where origin = 'Los Angeles' and destination = 'Honolulu'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show flight number for all flights with more than 2000 distance. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select flno from flight where distance > 2000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the numbers of all flights that can cover a distance of more than 2000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select flno from flight where distance > 2000" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price for flights from Los Angeles to Honolulu. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price ) from flight where origin = 'Los Angeles' and destination = 'Honolulu'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price for flights from LA to Honolulu? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price ) from flight where origin = 'Los Angeles' and destination = 'Honolulu'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show origin and destination for flights with price higher than 300. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select origin , destination from flight where price > 300" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the origin and destination for all flights whose price is higher than 300? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select origin , destination from flight where price > 300" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the flight number and distance of the flight with maximum price. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select flno , distance from flight order by price desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the flight number and its distance for the one with the maximum price? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select flno , distance from flight order by price desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the flight number of flights with three lowest distances. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select flno from flight order by distance asc limit 3" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the numbers of the shortest flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select flno from flight order by distance asc limit 3" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average distance and average price for flights from Los Angeles. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( distance ) , avg ( price ) from flight where origin = 'Los Angeles'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average distance and price for all flights from LA? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( distance ) , avg ( price ) from flight where origin = 'Los Angeles'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all origins and the number of flights from each origin. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select origin , count ( * ) from flight group by origin" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each origin, how many flights came from there? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select origin , count ( * ) from flight group by origin" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all destinations and the number of flights to each destination. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select destination , count ( * ) from flight group by destination" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the destinations and number of flights to each one? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select destination , count ( * ) from flight group by destination" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which origin has most number of flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select origin from flight group by origin order by count ( * ) desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What place has the most flights coming from there? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select origin from flight group by origin order by count ( * ) desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which destination has least number of flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select destination from flight group by destination order by count ( * ) asc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What destination has the fewest number of flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select destination from flight group by destination order by count ( * ) asc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the aircraft name for the flight with number 99 | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid where flight.flno = 99" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the aircraft that was on flight number 99? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid where flight.flno = 99" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all flight numbers with aircraft Airbus A340-300. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select flight.flno from flight join aircraft on flight.aid = aircraft.aid where aircraft.name = 'Airbus A340-300'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the flight numbers for the aircraft Airbus A340-300? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select flight.flno from flight join aircraft on flight.aid = aircraft.aid where aircraft.name = 'Airbus A340-300'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show aircraft names and number of flights for each aircraft. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select aircraft.name , count ( * ) from flight join aircraft on flight.aid = aircraft.aid group by flight.aid" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of each aircraft and how many flights does each one complete? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select aircraft.name , count ( * ) from flight join aircraft on flight.aid = aircraft.aid group by flight.aid" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all aircraft with at least two flights. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid group by flight.aid having count ( * ) >= 2" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names for all aircrafts with at least 2 flights? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select aircraft.name from flight join aircraft on flight.aid = aircraft.aid group by flight.aid having count ( * ) >= 2" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees have certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct eid ) from certificate" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of distinct employees with certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct eid ) from certificate" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all employees who don't have a certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select eid from employee except select eid from certificate" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all employees that don't have certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select eid from employee except select eid from certificate" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all aircrafts of which John Williams has certificates. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where employee.name = 'John Williams'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all aircrafts that John Williams have certificates to be able to fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where employee.name = 'John Williams'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all employees who have certificate of Boeing 737-800. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all employees who have a certificate to fly Boeing 737-800? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800' intersect select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Airbus A340-300'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800' intersect select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Airbus A340-300'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all employees who do not have certificate of Boeing 737-800. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from employee except select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all employees who are not certified to fly Boeing 737-800s? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from employee except select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.name = 'Boeing 737-800'" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of aircraft which fewest people have its certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid group by certificate.aid order by count ( * ) desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the aircraft that the least people are certified to fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid group by certificate.aid order by count ( * ) desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate. | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) >= _ asc | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by certificate.aid order by count ( * ) >= 5 asc" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) >= _ asc | select aircraft.name from certificate join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by certificate.aid order by count ( * ) >= 5 asc" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the salary and name of the employee who has the most number of aircraft certificates? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select employee.name , employee.salary from employee join certificate on employee.eid = certificate.eid group by employee.eid order by count ( * ) desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the salaray and name of the employee that is certified to fly the most planes? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select employee.name , employee.salary from employee join certificate on employee.eid = certificate.eid group by employee.eid order by count ( * ) desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by employee.eid order by count ( * ) desc limit 1" }, { "db_id": "flight_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the salaray and name of the employee with the most certificates to fly planes more than 5000? | flight : flno , origin , destination , distance , departure_date , arrival_date , price , aid | aircraft : aid , name , distance | employee : eid , name , salary | certificate : eid , aid | flight.aid = aircraft.aid | certificate.aid = aircraft.aid | certificate.eid = employee.eid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select employee.name from employee join certificate on employee.eid = certificate.eid join aircraft on aircraft.aid = certificate.aid where aircraft.distance > 5000 group by employee.eid order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many allergies are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct allergy ) from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many allergy entries are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct allergy ) from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different allergy types exist? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct allergytype ) from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct allergies are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct allergytype ) from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all allergy types. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct allergytype from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different allergy types? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct allergytype from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all allergies and their types. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select allergy , allergytype from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the allergies and their types? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select allergy , allergytype from allergy_type" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all allergies with type food. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct allergy from allergy_type where allergytype = 'food'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the different food allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct allergy from allergy_type where allergytype = 'food'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of allergy Cat? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select allergytype from allergy_type where allergy = 'Cat'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is allergy type of a cat allergy? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select allergytype from allergy_type where allergy = 'Cat'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many allergies have type animal? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from allergy_type where allergytype = 'animal'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many animal type allergies exist? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from allergy_type where allergytype = 'animal'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all allergy types and the number of allergies in each type. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select allergytype , count ( * ) from allergy_type group by allergytype" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the allergy types and how many allergies correspond to each one? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select allergytype , count ( * ) from allergy_type group by allergytype" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which allergy type has most number of allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which allergy type is most common? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which allergy type has least number of allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) asc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which allergy type is the least common? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select allergytype from allergy_type group by allergytype order by count ( * ) asc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show first name and last name for all students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select fname , lname from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of all students | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select fname , lname from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different advisors are listed? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct advisor ) from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many advisors are there? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct advisor ) from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all majors. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct major from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different majors? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct major from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all cities where students live. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct city_code from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What cities do students live in? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct city_code from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show first name, last name, age for all female students. Their sex is F. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname , age from student where sex = 'F'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names and ages for all female students whose sex is F? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname , age from student where sex = 'F'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show student ids for all male students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where sex = 'M'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the student ids for all male students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where sex = 'M'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are age 18? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student where age = 18" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are 18 years old? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student where age = 18" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all student ids who are older than 20. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where age > 20" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the student ids for students over 20 years old? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where age > 20" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city does the student whose last name is \"Kim\" live in? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select city_code from student where lname = 'Kim'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the city that the student whose family name is Kim lives in. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select city_code from student where lname = 'Kim'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the advisor of student with ID 1004? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select advisor from student where stuid = 1004" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who advises student 1004? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select advisor from student where stuid = 1004" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students live in HKG or CHI? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student where city_code = 'HKG' or city_code = 'CHI'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the number of students living in either HKG or CHI. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student where city_code = 'HKG' or city_code = 'CHI'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the minimum, average, and maximum age of all students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( age ) , avg ( age ) , max ( age ) from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the minimum, mean, and maximum age across all students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( age ) , avg ( age ) , max ( age ) from student" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the youngest student? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ ) | select lname from student where age = ( select min ( age ) from student )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Provide the last name of the youngest student. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ ) | select lname from student where age = ( select min ( age ) from student )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the student id of the oldest student. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select stuid from student where age = ( select max ( age ) from student )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What student id corresponds to the oldest student? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select stuid from student where age = ( select max ( age ) from student )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all majors and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select major , count ( * ) from student group by major" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are there for each major? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select major , count ( * ) from student group by major" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which major has most number of students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select major from student group by major order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the largest major? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select major from student group by major order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all ages and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select age , count ( * ) from student group by age" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How old is each student and how many students are each age? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select age , count ( * ) from student group by age" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average age for male and female students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , sex from student group by sex" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average ages for male and female students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , sex from student group by sex" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all cities and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select city_code , count ( * ) from student group by city_code" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students live in each city? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select city_code , count ( * ) from student group by city_code" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all advisors and corresponding number of students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select advisor , count ( * ) from student group by advisor" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students does each advisor have? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select advisor , count ( * ) from student group by advisor" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which advisor has most number of students? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select advisor from student group by advisor order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the advisor with the most students. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select advisor from student group by advisor order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students have cat allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from has_allergy where allergy = 'Cat'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are affected by cat allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from has_allergy where allergy = 'Cat'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all student IDs who have at least two allergies. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select stuid from has_allergy group by stuid having count ( * ) >= 2" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the students ids of students who have more than one allergy? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select stuid from has_allergy group by stuid having count ( * ) >= 2" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the student ids of students who don't have any allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from has_allergy" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students are unaffected by allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from has_allergy" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many female students have milk or egg allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from has_allergy join student on has_allergy.stuid = student.stuid where student.sex = 'F' and has_allergy.allergy = 'Milk' or has_allergy.allergy = 'Eggs'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students who are female are allergic to milk or eggs? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from has_allergy join student on has_allergy.stuid = student.stuid where student.sex = 'F' and has_allergy.allergy = 'Milk' or has_allergy.allergy = 'Eggs'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students have a food allergy? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are affected by food related allergies? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which allergy has most number of students affected? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select allergy from has_allergy group by allergy order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which allergy is the most common? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select allergy from has_allergy group by allergy order by count ( * ) desc limit 1" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all allergies with number of students affected. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select allergy , count ( * ) from has_allergy group by allergy" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students have each different allergy? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select allergy , count ( * ) from has_allergy group by allergy" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all allergy type with number of students affected. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select allergy_type.allergytype , count ( * ) from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy group by allergy_type.allergytype" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are affected by each allergy type? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select allergy_type.allergytype , count ( * ) from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy group by allergy_type.allergytype" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name and age of the student who has allergy to both milk and cat. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select lname , age from student where stuid in ( select stuid from has_allergy where allergy = 'Milk' intersect select stuid from has_allergy where allergy = 'Cat' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names and ages of the students who are allergic to milk and cat? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select lname , age from student where stuid in ( select stuid from has_allergy where allergy = 'Milk' intersect select stuid from has_allergy where allergy = 'Cat' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select allergy_type.allergy , allergy_type.allergytype from allergy_type join has_allergy on allergy_type.allergy = has_allergy.allergy join student on student.stuid = has_allergy.stuid where student.fname = 'Lisa' order by allergy_type.allergy asc" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select allergy_type.allergy , allergy_type.allergytype from allergy_type join has_allergy on allergy_type.allergy = has_allergy.allergy join student on student.stuid = has_allergy.stuid where student.fname = 'Lisa' order by allergy_type.allergy asc" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and gender of the student who has allergy to milk but not cat. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ except select _ from _ where _ ) | select fname , sex from student where stuid in ( select stuid from has_allergy where allergy = 'Milk' except select stuid from has_allergy where allergy = 'Cat' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and gender of the students who have allergy to milk but can put up with cats? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ except select _ from _ where _ ) | select fname , sex from student where stuid in ( select stuid from has_allergy where allergy = 'Milk' except select stuid from has_allergy where allergy = 'Cat' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of the students who have allergies with food and animal types. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select avg ( age ) from student where stuid in ( select has_allergy.stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' intersect select has_allergy.stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'animal' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How old are the students with allergies to food and animal types on average? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select avg ( age ) from student where stuid in ( select has_allergy.stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' intersect select has_allergy.stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'animal' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first and last name of the students who do not have any food type allergy. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select fname , lname from student where stuid not in ( select has_allergy.stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the full name of each student who is not allergic to any type of food. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select fname , lname from student where stuid not in ( select has_allergy.stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of male (sex is 'M') students who have some food type allery. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ in ( select _ from _ where _ ) | select count ( * ) from student where sex = 'M' and stuid in ( select stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many male students (sex is 'M') are allergic to any type of food? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ in ( select _ from _ where _ ) | select count ( * ) from student where sex = 'M' and stuid in ( select stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the different first names and cities of the students who have allergy to milk or cat. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname , student.city_code from student join has_allergy on student.stuid = has_allergy.stuid where has_allergy.allergy = 'Milk' or has_allergy.allergy = 'Cat'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct first names and cities of the students who have allergy either to milk or to cat? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname , student.city_code from student join has_allergy on student.stuid = has_allergy.stuid where has_allergy.allergy = 'Milk' or has_allergy.allergy = 'Cat'" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students who are older than 18 and do not have allergy to either food or animal. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from student where age > 18 and stuid not in ( select stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' or allergy_type.allergytype = 'animal' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are over 18 and do not have allergy to food type or animal type? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from student where age > 18 and stuid not in ( select stuid from has_allergy join allergy_type on has_allergy.allergy = allergy_type.allergy where allergy_type.allergytype = 'food' or allergy_type.allergytype = 'animal' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and major of the students who are not allegry to soy. | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select fname , major from student where stuid not in ( select stuid from has_allergy where allergy = 'Soy' )" }, { "db_id": "allergy_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and major of the students who are able to consume soy? | allergy_type : allergy , allergytype | has_allergy : stuid , allergy | student : stuid , lname , fname , age , sex , major , advisor , city_code | has_allergy.allergy = allergy_type.allergy | has_allergy.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select fname , major from student where stuid not in ( select stuid from has_allergy where allergy = 'Soy' )" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: A list of the top 5 countries by number of invoices. List country name and number of invoices. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select billing_country , count ( * ) from invoices group by billing_country order by count ( * ) desc limit 5" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the top 5 countries by number of invoices and how many do they have? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select billing_country , count ( * ) from invoices group by billing_country order by count ( * ) desc limit 5" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select billing_country , sum ( total ) from invoices group by billing_country order by sum ( total ) desc limit 8" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the top 8 countries by total invoice size and what are those sizes? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select billing_country , sum ( total ) from invoices group by billing_country order by sum ( total ) desc limit 8" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: A list of the top 10 countries by average invoice size. List country name and average invoice size. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select billing_country , avg ( total ) from invoices group by billing_country order by avg ( total ) desc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the countries and average invoice size of the top countries by size? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select billing_country , avg ( total ) from invoices group by billing_country order by avg ( total ) desc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find out 5 customers who most recently purchased something. List customers' first and last name. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select customers.first_name , customers.last_name from customers join invoices on invoices.customer_id = customers.id order by invoices.invoice_date desc limit 5" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the 5 customers who purchased something most recently? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select customers.first_name , customers.last_name from customers join invoices on invoices.customer_id = customers.id order by invoices.invoice_date desc limit 5" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select customers.first_name , customers.last_name , count ( * ) from customers join invoices on invoices.customer_id = customers.id group by customers.id order by count ( * ) desc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the top 10 customers' first and last names by total number of orders and how many orders did they make? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select customers.first_name , customers.last_name , count ( * ) from customers join invoices on invoices.customer_id = customers.id group by customers.id order by count ( * ) desc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the top 10 customers by total gross sales. List customers' first and last name and total gross sales. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select customers.first_name , customers.last_name , sum ( invoices.total ) from customers join invoices on invoices.customer_id = customers.id group by customers.id order by sum ( invoices.total ) desc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select customers.first_name , customers.last_name , sum ( invoices.total ) from customers join invoices on invoices.customer_id = customers.id group by customers.id order by sum ( invoices.total ) desc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the top 5 genres by number of tracks. List genres name and total tracks. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select genres.name , count ( * ) from genres join tracks on tracks.genre_id = genres.id group by genres.id order by count ( * ) desc limit 5" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tracks does each genre have and what are the names of the top 5? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select genres.name , count ( * ) from genres join tracks on tracks.genre_id = genres.id group by genres.id order by count ( * ) desc limit 5" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List every album's title. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ | select title from albums" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all the albums? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ | select title from albums" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List every album ordered by album title in ascending order. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select title from albums order by title asc" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all the albums alphabetically ascending? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select title from albums order by title asc" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List every album whose title starts with A in alphabetical order. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ like _ order by _ asc | select title from albums where title like 'A%' order by title asc" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all albums that start with A in alphabetical order? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ like _ order by _ asc | select title from albums where title like 'A%' order by title asc" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the customers first and last name of 10 least expensive invoices. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select customers.first_name , customers.last_name from customers join invoices on invoices.customer_id = customers.id order by total asc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the customers with the 10 cheapest invoices? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select customers.first_name , customers.last_name from customers join invoices on invoices.customer_id = customers.id order by total asc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List total amount of invoice from Chicago, IL. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( total ) from invoices where billing_city = 'Chicago' and billing_state = 'IL'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total amount of money in the invoices billed from Chicago, Illinois? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( total ) from invoices where billing_city = 'Chicago' and billing_state = 'IL'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the number of invoices from Chicago, IL. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from invoices where billing_city = 'Chicago' and billing_state = 'IL'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many invoices were billed from Chicago, IL? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from invoices where billing_city = 'Chicago' and billing_state = 'IL'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the number of invoices from the US, grouped by state. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select billing_state , count ( * ) from invoices where billing_country = 'USA' group by billing_state" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many invoices were billed from each state? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select billing_state , count ( * ) from invoices where billing_country = 'USA' group by billing_state" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the state in the US with the most invoices. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ order by count ( _ ) desc limit _ | select billing_state , count ( * ) from invoices where billing_country = 'USA' group by billing_state order by count ( * ) desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the states with the most invoices? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ order by count ( _ ) desc limit _ | select billing_state , count ( * ) from invoices where billing_country = 'USA' group by billing_state order by count ( * ) desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the number of invoices and the invoice total from California. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) , sum ( _ ) from _ where _ | select billing_state , count ( * ) , sum ( total ) from invoices where billing_state = 'CA'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of invoices and total money billed in them from CA? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) , sum ( _ ) from _ where _ | select billing_state , count ( * ) , sum ( total ) from invoices where billing_state = 'CA'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List Aerosmith's albums. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select albums.title from albums join artists on albums.artist_id = artists.id where artists.name = 'Aerosmith'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all the Aerosmith albums? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select albums.title from albums join artists on albums.artist_id = artists.id where artists.name = 'Aerosmith'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many albums does Billy Cobham has? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from albums join artists on albums.artist_id = artists.id where artists.name = 'Billy Cobham'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many albums has Billy Cobam released? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from albums join artists on albums.artist_id = artists.id where artists.name = 'Billy Cobham'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Eduardo Martins is a customer at which company? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select company from customers where first_name = 'Eduardo' and last_name = 'Martins'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the company where Eduardo Martins is a customer? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select company from customers where first_name = 'Eduardo' and last_name = 'Martins'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is Astrid Gruber's email and phone number? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select email , phone from customers where first_name = 'Astrid' and last_name = 'Gruber'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the email and phone number of Astrid Gruber the customer? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select email , phone from customers where first_name = 'Astrid' and last_name = 'Gruber'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers live in Prague city? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers where city = 'Prague'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers live in the city of Prague? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers where city = 'Prague'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers in state of CA? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers where state = 'CA'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are from California? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers where state = 'CA'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What country does Roberto Almeida live? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select country from customers where first_name = 'Roberto' and last_name = 'Almeida'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which country does Roberto Almeida? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select country from customers where first_name = 'Roberto' and last_name = 'Almeida'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of albums that are released by aritist whose name has 'Led' | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select albums.title from artists join albums on artists.id = albums.artist_id where artists.name like '%Led%'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of the album that was released by the artist whose name has the phrase 'Led'? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select albums.title from artists join albums on artists.id = albums.artist_id where artists.name like '%Led%'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers does Steve Johnson support? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from employees join customers on customers.support_rep_id = employees.id where employees.first_name = 'Steve' and employees.last_name = 'Johnson'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of customers that Steve Johnson supports? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from employees join customers on customers.support_rep_id = employees.id where employees.first_name = 'Steve' and employees.last_name = 'Johnson'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title, phone and hire date of Nancy Edwards? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select title , phone , hire_date from employees where first_name = 'Nancy' and last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title, phone number and hire date for the employee named Nancy Edwards? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select title , phone , hire_date from employees where first_name = 'Nancy' and last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the full name of employees who report to Nancy Edwards? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select employees.first_name , employees.last_name from employees join employees on employees.id = employees.reports_to where employees.first_name = 'Nancy' and employees.last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the employee who reports to Nancy Edwards? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select employees.first_name , employees.last_name from employees join employees on employees.id = employees.reports_to where employees.first_name = 'Nancy' and employees.last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the address of employee Nancy Edwards? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select address from employees where first_name = 'Nancy' and last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is Nancy Edwards's address? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select address from employees where first_name = 'Nancy' and last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the full name of employee who supported the most number of customers. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select employees.first_name , employees.last_name from employees join customers on employees.id = customers.support_rep_id group by employees.id order by count ( * ) desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the full name of the employee who has the most customers? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select employees.first_name , employees.last_name from employees join customers on employees.id = customers.support_rep_id group by employees.id order by count ( * ) desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees are living in Canada? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from employees where country = 'Canada'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees live in Canada? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from employees where country = 'Canada'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is employee Nancy Edwards's phone number? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select phone from employees where first_name = 'Nancy' and last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the the phone number of Nancy Edwards? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select phone from employees where first_name = 'Nancy' and last_name = 'Edwards'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the youngest employee in the company? List employee's first and last name. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select first_name , last_name from employees order by birth_date desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What si the youngest employee's first and last name? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select first_name , last_name from employees order by birth_date desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List top 10 employee work longest in the company. List employee's first and last name. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select first_name , last_name from employees order by hire_date asc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the top 10 longest-serving employees? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select first_name , last_name from employees order by hire_date asc limit 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of employees whose title is IT Staff from each city? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , city from employees where title = 'IT Staff' group by city" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees who are IT staff are from each city? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , city from employees where title = 'IT Staff' group by city" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select employees.first_name , employees.last_name , count ( employees.reports_to ) from employees join employees on employees.reports_to = employees.id group by employees.reports_to order by count ( employees.reports_to ) desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all the employees and how many people report to them? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select employees.first_name , employees.last_name , count ( employees.reports_to ) from employees join employees on employees.reports_to = employees.id group by employees.reports_to order by count ( employees.reports_to ) desc limit 1" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many orders does Lucas Mancini has? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers join invoices on customers.id = invoices.customer_id where customers.first_name = 'Lucas' and customers.last_name = 'Mancini'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many orders does Luca Mancini have in his invoices? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers join invoices on customers.id = invoices.customer_id where customers.first_name = 'Lucas' and customers.last_name = 'Mancini'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of money spent by Lucas Mancini? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( invoices.total ) from customers join invoices on customers.id = invoices.customer_id where customers.first_name = 'Lucas' and customers.last_name = 'Mancini'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How much money did Lucas Mancini spend? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( invoices.total ) from customers join invoices on customers.id = invoices.customer_id where customers.first_name = 'Lucas' and customers.last_name = 'Mancini'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all media types. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ | select name from media_types" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the media types? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ | select name from media_types" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all different genre types. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect distinct _ from _ | select distinct name from genres" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of the genres? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect distinct _ from _ | select distinct name from genres" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all playlist. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ | select name from playlists" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the playlists? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ | select name from playlists" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the composer of track Fast As a Shark? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select composer from tracks where name = 'Fast As a Shark'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the composer who created the track \"Fast As a Shark\"? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select composer from tracks where name = 'Fast As a Shark'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How long does track Fast As a Shark has? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select milliseconds from tracks where name = 'Fast As a Shark'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many milliseconds long is Fast As a Shark? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select milliseconds from tracks where name = 'Fast As a Shark'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of tracks whose genre is Rock? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id where genres.name = 'Rock'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of all tracks in the Rock genre? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id where genres.name = 'Rock'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is title of album which track Balls to the Wall belongs to? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select albums.title from albums join tracks on albums.id = tracks.genre_id where tracks.name = 'Balls to the Wall'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the album that has the track Ball to the Wall? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select albums.title from albums join tracks on albums.id = tracks.genre_id where tracks.name = 'Balls to the Wall'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List name of all tracks in Balls to the Wall. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from albums join tracks on albums.id = tracks.genre_id where albums.title = 'Balls to the Wall'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of all tracks in the album named Balls to the Wall? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from albums join tracks on albums.id = tracks.genre_id where albums.title = 'Balls to the Wall'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List title of albums have the number of tracks greater than 10. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select albums.title from albums join tracks on albums.id = tracks.album_id group by albums.id having count ( albums.id ) > 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the albums that have more than 10 tracks? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select albums.title from albums join tracks on albums.id = tracks.album_id group by albums.id having count ( albums.id ) > 10" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of tracks belongs to genre Rock and whose media type is MPEG audio file. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id join media_types on media_types.id = tracks.media_type_id where genres.name = 'Rock' and media_types.name = 'MPEG audio file'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all Rock tracks that are stored on MPEG audio files? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id join media_types on media_types.id = tracks.media_type_id where genres.name = 'Rock' and media_types.name = 'MPEG audio file'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of tracks belongs to genre Rock or media type is MPEG audio file. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id join media_types on media_types.id = tracks.media_type_id where genres.name = 'Rock' or media_types.name = 'MPEG audio file'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all tracks that belong to the Rock genre and whose media type is MPEG? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id join media_types on media_types.id = tracks.media_type_id where genres.name = 'Rock' or media_types.name = 'MPEG audio file'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of tracks belongs to genre Rock or genre Jazz. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id where genres.name = 'Rock' or genres.name = 'Jazz'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the tracks that are Rock or Jazz songs? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from genres join tracks on genres.id = tracks.genre_id where genres.name = 'Rock' or genres.name = 'Jazz'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all tracks in the playlists of Movies. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlists.id = playlist_tracks.playlist_id where playlists.name = 'Movies'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all tracks that are on playlists titled Movies? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlists.id = playlist_tracks.playlist_id where playlists.name = 'Movies'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of playlist which has number of tracks greater than 100. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select playlists.name from playlist_tracks join playlists on playlists.id = playlist_tracks.playlist_id group by playlist_tracks.playlist_id having count ( playlist_tracks.track_id ) > 100" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all playlists that have more than 100 tracks? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select playlists.name from playlist_tracks join playlists on playlists.id = playlist_tracks.playlist_id group by playlist_tracks.playlist_id having count ( playlist_tracks.track_id ) > 100" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all tracks bought by customer Daan Peeters. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from tracks join invoice_lines on tracks.id = invoice_lines.track_id join invoices on invoices.id = invoice_lines.invoice_id join customers on customers.id = invoices.customer_id where customers.first_name = 'Daan' and customers.last_name = 'Peeters'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the tracks that Dean Peeters bought? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select tracks.name from tracks join invoice_lines on tracks.id = invoice_lines.track_id join invoices on invoices.id = invoice_lines.invoice_id join customers on customers.id = invoices.customer_id where customers.first_name = 'Daan' and customers.last_name = 'Peeters'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How much is the track Fast As a Shark? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select unit_price from tracks where name = 'Fast As a Shark'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the unit price of the tune \"Fast As a Shark\"? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ | select unit_price from tracks where name = 'Fast As a Shark'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of tracks which are in Movies playlist but not in music playlist. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Movies' except select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Music'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all tracks that are on the Movies playlist but not in the music playlist? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Movies' except select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Music'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of tracks which are in both Movies and music playlists. | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Movies' intersect select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Music'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the tracks that are in both the Movies and music playlists? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Movies' intersect select tracks.name from tracks join playlist_tracks on tracks.id = playlist_tracks.track_id join playlists on playlist_tracks.playlist_id = playlists.id where playlists.name = 'Music'" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find number of tracks in each genre? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , genres.name from genres join tracks on genres.id = tracks.genre_id group by genres.name" }, { "db_id": "store_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tracks are in each genre? | artists : id , name | sqlite_sequence : name , seq | albums : id , title , artist_id | employees : id , last_name , first_name , title , reports_to , birth_date , hire_date , address , city , state , country , postal_code , phone , fax , email | customers : id , first_name , last_name , company , address , city , state , country , postal_code , phone , fax , email , support_rep_id | genres : id , name | invoices : id , customer_id , invoice_date , billing_address , billing_city , billing_state , billing_country , billing_postal_code , total | media_types : id , name | tracks : id , name , album_id , media_type_id , genre_id , composer , milliseconds , bytes , unit_price | invoice_lines : id , invoice_id , track_id , unit_price , quantity | playlists : id , name | playlist_tracks : playlist_id , track_id | albums.artist_id = artists.id | employees.reports_to = employees.id | customers.support_rep_id = employees.id | invoices.customer_id = customers.id | tracks.media_type_id = media_types.id | tracks.genre_id = genres.id | tracks.album_id = albums.id | invoice_lines.track_id = tracks.id | invoice_lines.invoice_id = invoices.id | playlist_tracks.track_id = tracks.id | playlist_tracks.playlist_id = playlists.id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , genres.name from genres join tracks on genres.id = tracks.genre_id group by genres.name" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many editors are there? | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from editor" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of editors in ascending order of age. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from editor order by age asc" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ages of editors? | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ | select name , age from editor" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of editors who are older than 25. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ where _ | select name from editor where age > 25" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of editors of age either 24 or 25. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ where _ | select name from editor where age = 24 or age = 25" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the youngest editor? | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from editor order by age asc limit 1" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different ages of editors? Show each age along with the number of editors of that age. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select age , count ( * ) from editor group by age" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the most common age of editors. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select age from editor group by age order by count ( * ) desc limit 1" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct themes of journals. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct theme from journal" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of editors and the theme of journals for which they serve on committees. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ | select editor.name , journal.theme from journal_committee join editor on journal_committee.editor_id = editor.editor_id join journal on journal_committee.journal_id = journal.journal_id" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each journal_committee, find the editor name and the journal theme. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ | select editor.name , journal.theme from journal_committee join editor on journal_committee.editor_id = editor.editor_id join journal on journal_committee.journal_id = journal.journal_id" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select editor.name , editor.age , journal.theme from journal_committee join editor on journal_committee.editor_id = editor.editor_id join journal on journal_committee.journal_id = journal.journal_id order by journal.theme asc" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of editors that are on the committee of journals with sales bigger than 3000. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ where _ | select editor.name from journal_committee join editor on journal_committee.editor_id = editor.editor_id join journal on journal_committee.journal_id = journal.journal_id where journal.sales > 3000" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id, name of each editor and the number of journal committees they are on. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select editor.editor_id , editor.name , count ( * ) from editor join journal_committee on editor.editor_id = journal_committee.editor_id group by editor.editor_id" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of editors that are on at least two journal committees. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select editor.name from editor join journal_committee on editor.editor_id = journal_committee.editor_id group by editor.name having count ( * ) >= 2" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of editors that are not on any journal committee. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from editor where editor_id not in ( select editor_id from journal_committee )" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the date, theme and sales of the journal which did not have any of the listed editors serving on committee. | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select date , theme , sales from journal except select journal.date , journal.theme , journal.sales from journal join journal_committee on journal.journal_id = journal_committee.journal_id" }, { "db_id": "journal_committee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average sales of the journals that have an editor whose work type is 'Photo'? | journal : journal_id , date , theme , sales | editor : editor_id , name , age | journal_committee : editor_id , journal_id , work_type | journal_committee.journal_id = journal.journal_id | journal_committee.editor_id = editor.editor_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( journal.sales ) from journal join journal_committee on journal.journal_id = journal_committee.journal_id where journal_committee.work_type = 'Photo'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts do we have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of accounts. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids, customer ids, names for all accounts. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ | select account_id , customer_id , account_name from accounts" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the account ids, customer ids, and account names for all the accounts? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ | select account_id , customer_id , account_name from accounts" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show other account details for account with name 338. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select other_account_details from accounts where account_name = '338'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the other account details for the account with the name 338? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select other_account_details from accounts where account_name = '338'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name, last name, and phone of the customer with account name 162? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_first_name , customers.customer_last_name , customers.customer_phone from accounts join customers on accounts.customer_id = customers.customer_id where accounts.account_name = '162'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the full name and phone of the customer who has the account name 162. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_first_name , customers.customer_last_name , customers.customer_phone from accounts join customers on accounts.customer_id = customers.customer_id where accounts.account_name = '162'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts does the customer with first name Art and last name Turcotte have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from accounts join customers on accounts.customer_id = customers.customer_id where customers.customer_first_name = 'Art' and customers.customer_last_name = 'Turcotte'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the number of accounts that the customer with the first name Art and last name Turcotte has. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from accounts join customers on accounts.customer_id = customers.customer_id where customers.customer_first_name = 'Art' and customers.customer_last_name = 'Turcotte'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all customer ids and the number of accounts for each customer. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customer_id , count ( * ) from accounts group by customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts are there for each customer id? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customer_id , count ( * ) from accounts group by customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the customer id and number of accounts with most accounts. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select customer_id , count ( * ) from accounts group by customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the customer id of the customer with the most accounts, and how many accounts does this person have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select customer_id , count ( * ) from accounts group by customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the customer first, last name and id with least number of accounts. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customers.customer_first_name , customers.customer_last_name , accounts.customer_id from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the full name and customer id of the customer with the fewest accounts. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customers.customer_first_name , customers.customer_last_name , accounts.customer_id from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of all customers without an account. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from accounts )" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers do not have an account? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from accounts )" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the first names and last names of customers without any account. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_first_name , customer_last_name from customers except select customers.customer_first_name , customers.customer_last_name from customers join accounts on customers.customer_id = accounts.customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of customers who do not have any accounts? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_first_name , customer_last_name from customers except select customers.customer_first_name , customers.customer_last_name from customers join accounts on customers.customer_id = accounts.customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show distinct first and last names for all customers with an account. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customers.customer_first_name , customers.customer_last_name from customers join accounts on customers.customer_id = accounts.customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of customers who have accounts? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customers.customer_first_name , customers.customer_last_name from customers join accounts on customers.customer_id = accounts.customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers have an account? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct customer_id ) from accounts" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers who hold an account. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct customer_id ) from accounts" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers do we have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids, first names, last names, and phones for all customers. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ | select customer_id , customer_first_name , customer_last_name , customer_phone from customers" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, full names, and phones of each customer? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ | select customer_id , customer_first_name , customer_last_name , customer_phone from customers" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the phone and email for customer with first name Aniyah and last name Feest? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone , customer_email from customers where customer_first_name = 'Aniyah' and customer_last_name = 'Feest'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the phone and email of the customer with the first name Aniyah and last name Feest. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone , customer_email from customers where customer_first_name = 'Aniyah' and customer_last_name = 'Feest'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of customer cards. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customer cards are there? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids, customer ids, card type codes, card numbers for all cards. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ | select card_id , customer_id , card_type_code , card_number from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are card ids, customer ids, card types, and card numbers for each customer card? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ | select card_id , customer_id , card_type_code , card_number from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the date valid from and the date valid to for the card with card number '4560596484842'. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select date_valid_from , date_valid_to from customers_cards where card_number = '4560596484842'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the valid from and valid to dates for the card with the number 4560596484842? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select date_valid_from , date_valid_to from customers_cards where card_number = '4560596484842'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name, last name, and phone of the customer with card 4560596484842. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_first_name , customers.customer_last_name , customers.customer_phone from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers_cards.card_number = '4560596484842'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the full name and phone of the customer who has card number 4560596484842. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_first_name , customers.customer_last_name , customers.customer_phone from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers_cards.card_number = '4560596484842'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many cards does customer Art Turcotte have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Art' and customers.customer_last_name = 'Turcotte'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of cards the customer with the first name Art and last name Turcotte has. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Art' and customers.customer_last_name = 'Turcotte'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many debit cards do we have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers_cards where card_type_code = 'Debit'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customer cards of the type Debit. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers_cards where card_type_code = 'Debit'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many credit cards does customer Blanche Huels have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Blanche' and customers.customer_last_name = 'Huels' and customers_cards.card_type_code = 'Credit'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of credit cards that the customer with first name Blanche and last name Huels has. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers_cards join customers on customers_cards.customer_id = customers.customer_id where customers.customer_first_name = 'Blanche' and customers.customer_last_name = 'Huels' and customers_cards.card_type_code = 'Credit'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all customer ids and the number of cards owned by each customer. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customer_id , count ( * ) from customers_cards group by customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different customer ids, and how many cards does each one hold? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customer_id , count ( * ) from customers_cards group by customer_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the customer id with most number of cards, and how many does he have? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select customer_id , count ( * ) from customers_cards group by customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the id of the customer who has the most cards, as well as the number of cards. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select customer_id , count ( * ) from customers_cards group by customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show id, first and last names for all customers with at least two cards. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select customers_cards.customer_id , customers.customer_first_name , customers.customer_last_name from customers_cards join customers on customers_cards.customer_id = customers.customer_id group by customers_cards.customer_id having count ( * ) >= 2" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and full names of customers who hold two or more cards? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select customers_cards.customer_id , customers.customer_first_name , customers.customer_last_name from customers_cards join customers on customers_cards.customer_id = customers.customer_id group by customers_cards.customer_id having count ( * ) >= 2" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the customer id, first and last name with least number of accounts. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customers_cards.customer_id , customers.customer_first_name , customers.customer_last_name from customers_cards join customers on customers_cards.customer_id = customers.customer_id group by customers_cards.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the id and full name of the customer who has the fewest accounts. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customers_cards.customer_id , customers.customer_first_name , customers.customer_last_name from customers_cards join customers on customers_cards.customer_id = customers.customer_id group by customers_cards.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all card type codes and the number of cards in each type. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select card_type_code , count ( * ) from customers_cards group by card_type_code" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different card types, and how many cards are there of each? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select card_type_code , count ( * ) from customers_cards group by card_type_code" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the card type code with most number of cards? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select card_type_code from customers_cards group by card_type_code order by count ( * ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the code of the card type that is most common. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select card_type_code from customers_cards group by card_type_code order by count ( * ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show card type codes with at least 5 cards. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select card_type_code from customers_cards group by card_type_code having count ( * ) >= 5" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes of card types that have 5 or more cards? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select card_type_code from customers_cards group by card_type_code having count ( * ) >= 5" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all card type codes and the number of customers holding cards in each type. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select card_type_code , count ( distinct customer_id ) from customers_cards group by card_type_code" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different card type codes, and how many different customers hold each type? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select card_type_code , count ( distinct customer_id ) from customers_cards group by card_type_code" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the customer ids and firstname without a credit card. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select customer_id , customer_first_name from customers except select customers_cards.customer_id , customers.customer_first_name from customers_cards join customers on customers_cards.customer_id = customers.customer_id where card_type_code = 'Credit'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and first names of customers who do not hold a credit card? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select customer_id , customer_first_name from customers except select customers_cards.customer_id , customers.customer_first_name from customers_cards join customers on customers_cards.customer_id = customers.customer_id where card_type_code = 'Credit'" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all card type codes. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct card_type_code from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different card type codes? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct card_type_code from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of card types. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct card_type_code ) from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different card types are there? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct card_type_code ) from customers_cards" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all transaction types. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct transaction_type from financial_transactions" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different types of transactions? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct transaction_type from financial_transactions" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of transaction types. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct transaction_type ) from financial_transactions" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different types of transactions are there? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct transaction_type ) from financial_transactions" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and total transaction amount? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect avg ( _ ) , sum ( _ ) from _ | select avg ( transaction_amount ) , sum ( transaction_amount ) from financial_transactions" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average transaction amount, as well as the total amount of all transactions. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect avg ( _ ) , sum ( _ ) from _ | select avg ( transaction_amount ) , sum ( transaction_amount ) from financial_transactions" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the card type codes and the number of transactions. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customers_cards.card_type_code , count ( * ) from financial_transactions join customers_cards on financial_transactions.card_id = customers_cards.card_id group by customers_cards.card_type_code" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different card types, and how many transactions have been made with each? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customers_cards.card_type_code , count ( * ) from financial_transactions join customers_cards on financial_transactions.card_id = customers_cards.card_id group by customers_cards.card_type_code" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the transaction type and the number of transactions. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select transaction_type , count ( * ) from financial_transactions group by transaction_type" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different transaction types, and how many transactions of each have taken place? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select transaction_type , count ( * ) from financial_transactions group by transaction_type" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the transaction type that has processed the greatest total amount in transactions? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select transaction_type from financial_transactions group by transaction_type order by sum ( transaction_amount ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the type of transaction with the highest total amount. | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select transaction_type from financial_transactions group by transaction_type order by sum ( transaction_amount ) desc limit 1" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the account id and the number of transactions for each account | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select account_id , count ( * ) from financial_transactions group by account_id" }, { "db_id": "customers_card_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different account ids that have made financial transactions, as well as how many transactions correspond to each? | accounts : account_id , customer_id , account_name , other_account_details | customers : customer_id , customer_first_name , customer_last_name , customer_address , customer_phone , customer_email , other_customer_details | customers_cards : card_id , customer_id , card_type_code , card_number , date_valid_from , date_valid_to , other_card_details | financial_transactions : transaction_id , previous_transaction_id , account_id , card_id , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | financial_transactions.account_id = accounts.account_id | financial_transactions.card_id = customers_cards.card_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select account_id , count ( * ) from financial_transactions group by account_id" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tracks do we have? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of tracks. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and location for all tracks. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ | select name , location from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and locations of all tracks? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ | select name , location from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names and seatings, ordered by seating for all tracks opened after 2000. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select name , seating from track where year_opened > 2000 order by seating asc" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and seatings for all tracks opened after 2000, ordered by seating? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select name , seating from track where year_opened > 2000 order by seating asc" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, location and seating for the most recently opened track? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , location , seating from track order by year_opened desc limit 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name, location, and seating of the track that was opened in the most recent year. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , location , seating from track order by year_opened desc limit 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the minimum, maximum, and average seating for all tracks. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( seating ) , max ( seating ) , avg ( seating ) from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the minimum, maximum, and average seating across all tracks. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( seating ) , max ( seating ) , avg ( seating ) from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, location, open year for all tracks with a seating higher than the average. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name , location , year_opened from track where seating > ( select avg ( seating ) from track )" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, locations, and years of opening for tracks with seating higher than average? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name , location , year_opened from track where seating > ( select avg ( seating ) from track )" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are distinct locations where tracks are located? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the different locations of tracks. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location from track" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many races are there? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from race" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from race" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct classes that races can have? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct class from race" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the different classes of races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct class from race" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show name, class, and date for all races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ | select name , class , date from race" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, classes, and dates for all races? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ | select name , class , date from race" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the race class and number of races in each class. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select class , count ( * ) from race group by class" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different classes of races, and how many races correspond to each? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select class , count ( * ) from race group by class" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the race class with most number of races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select class from race group by class order by count ( * ) desc limit 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the class of races that is most common. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select class from race group by class order by count ( * ) desc limit 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the race class with at least two races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select class from race group by class having count ( * ) >= 2" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the classes of races that have two or more corresponding races? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select class from race group by class having count ( * ) >= 2" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names for tracks without a race in class 'GT'. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from track except select track.name from race join track on race.track_id = track.track_id where race.class = 'GT'" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names of tracks that do not have a race in the class 'GT'. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from track except select track.name from race join track on race.track_id = track.track_id where race.class = 'GT'" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all track names that have had no races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from track where track_id not in ( select track_id from race )" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of tracks that have no had any races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from track where track_id not in ( select track_id from race )" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select year_opened from track where seating between 4000 and 5000" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the years of opening for tracks with seating between 4000 and 5000? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select year_opened from track where seating between 4000 and 5000" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of track and the number of races in each track. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select track.name , count ( * ) from race join track on race.track_id = track.track_id group by race.track_id" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of different tracks, and how many races has each had? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select track.name , count ( * ) from race join track on race.track_id = track.track_id group by race.track_id" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of track with most number of races. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select track.name from race join track on race.track_id = track.track_id group by race.track_id order by count ( * ) desc limit 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the track that has had the greatest number of races? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select track.name from race join track on race.track_id = track.track_id group by race.track_id order by count ( * ) desc limit 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and date for each race and its track name. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ | select race.name , race.date , track.name from race join track on race.track_id = track.track_id" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and dates of races, and the names of the tracks where they are held? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ | select race.name , race.date , track.name from race join track on race.track_id = track.track_id" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and location of track with 1 race. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select track.name , track.location from race join track on race.track_id = track.track_id group by race.track_id having count ( * ) = 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and locations of tracks that have had exactly 1 race? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select track.name , track.location from race join track on race.track_id = track.track_id group by race.track_id having count ( * ) = 1" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats. | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select location from track where seating > 90000 intersect select location from track where seating < 70000" }, { "db_id": "race_track", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats? | race : race_id , name , class , date , track_id | track : track_id , name , location , seating , year_opened | race.track_id = track.track_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select location from track where seating > 90000 intersect select location from track where seating < 70000" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many members have the black membership card? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from member where membership_card = 'Black'" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of members living in each address. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , address from member group by address" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the names of members whose address is in Harford or Waterbury. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select name from member where address = 'Harford' or address = 'Waterbury'" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids and names of members who are under age 30 or with black membership card. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select name , member_id from member where membership_card = 'Black' or age < 30" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the purchase time, age and address of each member, and show the results in the order of purchase time. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select time_of_purchase , age , address from member order by time_of_purchase asc" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which membership card has more than 5 members? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select membership_card from member group by membership_card having count ( * ) > 5" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which address has both members younger than 30 and members older than 40? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select address from member where age < 30 intersect select address from member where age > 40" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the membership card held by both members living in Hartford and ones living in Waterbury address? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select membership_card from member where address = 'Hartford' intersect select membership_card from member where address = 'Waterbury'" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many members are not living in Hartford? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from member where address != 'Hartford'" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which address do not have any member with the black membership card? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select address from member except select address from member where membership_card = 'Black'" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the shop addresses ordered by their opening year. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select address from shop order by open_year asc" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average score and average staff number of all shops? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ | select avg ( num_of_staff ) , avg ( score ) from shop" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and address of the shops whose score is below the average score. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select shop_id , address from shop where score < ( select avg ( score ) from shop )" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the address and staff number of the shops that do not have any happy hour. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select address , num_of_staff from shop where shop_id not in ( select shop_id from happy_hour )" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and address of the shops which have a happy hour in May? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select shop.address , shop.shop_id from shop join happy_hour on shop.shop_id = happy_hour.shop_id where month = 'May'" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: which shop has happy hour most frequently? List its id and number of happy hours. | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select shop_id , count ( * ) from happy_hour group by shop_id order by count ( * ) desc limit 1" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which month has the most happy hours? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select month from happy_hour group by month order by count ( * ) desc limit 1" }, { "db_id": "coffee_shop", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which months have more than 2 happy hours? | shop : shop_id , address , num_of_staff , score , open_year | member : member_id , name , membership_card , age , time_of_purchase , level_of_membership , address | happy_hour : hh_id , shop_id , month , num_of_shaff_in_charge | happy_hour_member : hh_id , member_id , total_amount | happy_hour.shop_id = shop.shop_id | happy_hour_member.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select month from happy_hour group by month having count ( * ) > 2" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many albums are there? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from album" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of albums. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from album" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all music genres. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ | select name from genre" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of different music genres? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ | select name from genre" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the customer information in state NY. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select * from customer where state = 'NY'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the customer information for customers in NY state? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select * from customer where state = 'NY'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and last names of the employees who live in Calgary city. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select firstname , lastname from employee where city = 'Calgary'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the full names of employees living in the city of Calgary. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select firstname , lastname from employee where city = 'Calgary'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct billing countries of the invoices? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( billingcountry ) from invoice" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the different billing countries for all invoices. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( billingcountry ) from invoice" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all artists that have \"a\" in their names. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from artist where name like '%a%'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of artist who have the letter 'a' in their names? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from artist where name like '%a%'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title of all the albums of the artist \"AC/DC\". | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select title from album join artist on album.artistid = artist.artistid where artist.name = 'AC/DC'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of albums by the artist \"AC/DC\"? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select title from album join artist on album.artistid = artist.artistid where artist.name = 'AC/DC'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Hom many albums does the artist \"Metallica\" have? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from album join artist on album.artistid = artist.artistid where artist.name = 'Metallica'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of albums by the artist \"Metallica\". | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from album join artist on album.artistid = artist.artistid where artist.name = 'Metallica'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which artist does the album \"Balls to the Wall\" belong to? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select artist.name from album join artist on album.artistid = artist.artistid where album.title = 'Balls to the Wall'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the artist who made the album \"Balls to the Wall\". | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select artist.name from album join artist on album.artistid = artist.artistid where album.title = 'Balls to the Wall'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which artist has the most albums? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select artist.name from album join artist on album.artistid = artist.artistid group by artist.name order by count ( * ) desc limit 1" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the artist with the greatest number of albums? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select artist.name from album join artist on album.artistid = artist.artistid group by artist.name order by count ( * ) desc limit 1" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all the tracks that contain the word \"you\". | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from track where name like '%you%'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of tracks that contain the the word you in them? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from track where name like '%you%'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average unit price of all the tracks? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( unitprice ) from track" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average unit price for a track. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( unitprice ) from track" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the durations of the longest and the shortest tracks in milliseconds? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( milliseconds ) , min ( milliseconds ) from track" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum and minimum durations of tracks in milliseconds. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( milliseconds ) , min ( milliseconds ) from track" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the album names, ids and the number of tracks for each album. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select album.title , track.albumid , count ( * ) from album join track on album.albumid = track.albumid group by track.albumid" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of the different albums, and how many tracks are on each? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select album.title , track.albumid , count ( * ) from album join track on album.albumid = track.albumid group by track.albumid" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the most common genre in all tracks? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select genre.name from genre join track on genre.genreid = track.genreid group by track.genreid order by count ( * ) desc limit 1" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the genre that is most frequent across all tracks. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select genre.name from genre join track on genre.genreid = track.genreid group by track.genreid order by count ( * ) desc limit 1" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the least common media type in all tracks? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select mediatype.name from mediatype join track on mediatype.mediatypeid = track.mediatypeid group by track.mediatypeid order by count ( * ) asc limit 1" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the media type that is least common across all tracks? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select mediatype.name from mediatype join track on mediatype.mediatypeid = track.mediatypeid group by track.mediatypeid order by count ( * ) asc limit 1" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the album names and ids for albums that contain tracks with unit price bigger than 1. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ group by _ | select album.title , track.albumid from album join track on album.albumid = track.albumid where track.unitprice > 1 group by track.albumid" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles and ids for albums containing tracks with unit price greater than 1? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ group by _ | select album.title , track.albumid from album join track on album.albumid = track.albumid where track.unitprice > 1 group by track.albumid" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tracks belong to rock genre? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from genre join track on genre.genreid = track.genreid where genre.name = 'Rock'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of tracks that are part of the rock genre. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from genre join track on genre.genreid = track.genreid where genre.name = 'Rock'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average unit price of tracks that belong to Jazz genre? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( unitprice ) from genre join track on genre.genreid = track.genreid where genre.name = 'Jazz'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average unit price of jazz tracks. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( unitprice ) from genre join track on genre.genreid = track.genreid where genre.name = 'Jazz'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name and last name of the customer that has email \"luisg@embraer.com.br\"? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select firstname , lastname from customer where email = 'luisg@embraer.com.br'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the full name of the customer with the email \"luisg@embraer.com.br\". | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select firstname , lastname from customer where email = 'luisg@embraer.com.br'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers have email that contains \"gmail.com\"? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from customer where email like '%gmail.com%'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers that have an email containing \"gmail.com\". | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from customer where email like '%gmail.com%'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name and last name employee helps the customer with first name Leonie? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select employee.firstname , employee.lastname from customer join employee on customer.supportrepid = employee.employeeid where customer.firstname = 'Leonie'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the full names of employees who help customers with the first name Leonie. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select employee.firstname , employee.lastname from customer join employee on customer.supportrepid = employee.employeeid where customer.firstname = 'Leonie'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What city does the employee who helps the customer with postal code 70174 live in? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select employee.city from customer join employee on customer.supportrepid = employee.employeeid where customer.postalcode = '70174'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the cities corresponding to employees who help customers with the postal code 70174. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select employee.city from customer join employee on customer.supportrepid = employee.employeeid where customer.postalcode = '70174'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct cities does the employees live in? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from employee" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of different cities that employees live in. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from employee" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select invoice.invoicedate from customer join invoice on customer.customerid = invoice.customerid where customer.firstname = 'Astrid' and lastname = 'Gruber'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the invoice dates for customers with the first name Astrid and the last name Gruber? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select invoice.invoicedate from customer join invoice on customer.customerid = invoice.customerid where customer.firstname = 'Astrid' and lastname = 'Gruber'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the customer last names that do not have invoice totals larger than 20. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select lastname from customer except select customer.lastname from customer join invoice on customer.customerid = invoice.customerid where invoice.total > 20" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of customers without invoice totals exceeding 20? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select lastname from customer except select customer.lastname from customer join invoice on customer.customerid = invoice.customerid where invoice.total > 20" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of all customers that live in Brazil and have an invoice. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customer.firstname from customer join invoice on customer.customerid = invoice.customerid where customer.country = 'Brazil'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different first names for customers from Brazil who have also had an invoice? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customer.firstname from customer join invoice on customer.customerid = invoice.customerid where customer.country = 'Brazil'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the address of all customers that live in Germany and have invoice. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customer.address from customer join invoice on customer.customerid = invoice.customerid where customer.country = 'Germany'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the addresses of customers living in Germany who have had an invoice? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customer.address from customer join invoice on customer.customerid = invoice.customerid where customer.country = 'Germany'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the phone numbers of all employees. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ | select phone from employee" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phone numbers for each employee? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ | select phone from employee" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tracks are in the AAC audio file media type? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from mediatype join track on mediatype.mediatypeid = track.mediatypeid where mediatype.name = 'AAC audio file'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of tracks that are of the media type \"AAC audio file\". | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from mediatype join track on mediatype.mediatypeid = track.mediatypeid where mediatype.name = 'AAC audio file'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( milliseconds ) from genre join track on genre.genreid = track.genreid where genre.name = 'Latin' or genre.name = 'Pop'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average millisecond length of Latin and Pop tracks. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( milliseconds ) from genre join track on genre.genreid = track.genreid where genre.name = 'Latin' or genre.name = 'Pop'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the employee first names and ids of employees who serve at least 10 customers. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select customer.firstname , customer.supportrepid from customer join employee on customer.supportrepid = employee.employeeid group by customer.supportrepid having count ( * ) >= 10" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and support rep ids for employees serving 10 or more customers? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select customer.firstname , customer.supportrepid from customer join employee on customer.supportrepid = employee.employeeid group by customer.supportrepid having count ( * ) >= 10" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the employee last names that serves no more than 20 customers. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select customer.lastname from customer join employee on customer.supportrepid = employee.employeeid group by customer.supportrepid having count ( * ) <= 20" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of employees who serve at most 20 customers? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select customer.lastname from customer join employee on customer.supportrepid = employee.employeeid group by customer.supportrepid having count ( * ) <= 20" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list all album titles in alphabetical order. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ order by _ asc | select title from album order by title asc" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the album titles, in alphabetical order? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ order by _ asc | select title from album order by title asc" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list the name and id of all artists that have at least 3 albums in alphabetical order. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ order by _ asc | select artist.name , album.artistid from album join artist on album.artistid = artist.artistid group by album.artistid having count ( * ) >= 3 order by artist.name asc" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of artists with 3 or more albums, listed in alphabetical order? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ order by _ asc | select artist.name , album.artistid from album join artist on album.artistid = artist.artistid group by album.artistid having count ( * ) >= 3 order by artist.name asc" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of artists that do not have any albums. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name from artist except select artist.name from album join artist on album.artistid = artist.artistid" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of artists who have not released any albums? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name from artist except select artist.name from album join artist on album.artistid = artist.artistid" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average unit price of rock tracks? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( track.unitprice ) from genre join track on genre.genreid = track.genreid where genre.name = 'Rock'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average unit price of tracks from the Rock genre. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( track.unitprice ) from genre join track on genre.genreid = track.genreid where genre.name = 'Rock'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the duration of the longest and shortest pop tracks in milliseconds? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( milliseconds ) , min ( milliseconds ) from genre join track on genre.genreid = track.genreid where genre.name = 'Pop'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum and minimum millisecond lengths of pop tracks. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( milliseconds ) , min ( milliseconds ) from genre join track on genre.genreid = track.genreid where genre.name = 'Pop'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the birth dates of employees living in Edmonton? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select birthdate from employee where city = 'Edmonton'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the birth dates corresponding to employees who live in the city of Edmonton. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ | select birthdate from employee where city = 'Edmonton'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct unit prices of all tracks? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( unitprice ) from track" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct unit prices for tracks. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( unitprice ) from track" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many artists do not have any album? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from artist where artistid not in ( select artistid from album )" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Cound the number of artists who have not released an album. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from artist where artistid not in ( select artistid from album )" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks? | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select album.title from album join track on album.albumid = track.albumid join genre on track.genreid = genre.genreid where genre.name = 'Reggae' intersect select album.title from album join track on album.albumid = track.albumid join genre on track.genreid = genre.genreid where genre.name = 'Rock'" }, { "db_id": "chinook_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of albums that contain tracks of both the Reggae and Rock genres. | album : albumid , title , artistid | artist : artistid , name | customer : customerid , firstname , lastname , company , address , city , state , country , postalcode , phone , fax , email , supportrepid | employee : employeeid , lastname , firstname , title , reportsto , birthdate , hiredate , address , city , state , country , postalcode , phone , fax , email | genre : genreid , name | invoice : invoiceid , customerid , invoicedate , billingaddress , billingcity , billingstate , billingcountry , billingpostalcode , total | invoiceline : invoicelineid , invoiceid , trackid , unitprice , quantity | mediatype : mediatypeid , name | playlist : playlistid , name | playlisttrack : playlistid , trackid | track : trackid , name , albumid , mediatypeid , genreid , composer , milliseconds , bytes , unitprice | album.artistid = artist.artistid | customer.supportrepid = employee.employeeid | employee.reportsto = employee.employeeid | invoice.customerid = customer.customerid | invoiceline.trackid = track.trackid | invoiceline.invoiceid = invoice.invoiceid | playlisttrack.trackid = track.trackid | playlisttrack.playlistid = playlist.playlistid | track.mediatypeid = mediatype.mediatypeid | track.genreid = genre.genreid | track.albumid = album.albumid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select album.title from album join track on album.albumid = track.albumid join genre on track.genreid = genre.genreid where genre.name = 'Reggae' intersect select album.title from album join track on album.albumid = track.albumid join genre on track.genreid = genre.genreid where genre.name = 'Rock'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the phone numbers. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ | select customer_phone from available_policies" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the phone numbers? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ | select customer_phone from available_policies" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the customer phone numbers under the policy \"Life Insurance\"? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone from available_policies where policy_type_code = 'Life Insurance'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phone numbers of customers using the policy with the code \"Life Insurance\"? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone from available_policies where policy_type_code = 'Life Insurance'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which policy type has the most records in the database? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select policy_type_code from available_policies group by policy_type_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which policy type appears most frequently in the available policies? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select policy_type_code from available_policies group by policy_type_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the customer phone numbers under the most popular policy type? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select customer_phone from available_policies where policy_type_code = ( select policy_type_code from available_policies group by policy_type_code order by count ( * ) desc limit 1 )" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the phone numbers of customers using the most common policy type among the available policies. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select customer_phone from available_policies where policy_type_code = ( select policy_type_code from available_policies group by policy_type_code order by count ( * ) desc limit 1 )" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the policy type used by more than 4 customers. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select policy_type_code from available_policies group by policy_type_code having count ( * ) > 4" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the policy types more than 4 customers use. Show their type code. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select policy_type_code from available_policies group by policy_type_code having count ( * ) > 4" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total and average amount of settlements. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect sum ( _ ) , avg ( _ ) from _ | select sum ( settlement_amount ) , avg ( settlement_amount ) from settlements" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the sum and average of all settlement amounts. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect sum ( _ ) , avg ( _ ) from _ | select sum ( settlement_amount ) , avg ( settlement_amount ) from settlements" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of services that have been used for more than 2 times in first notification of loss. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select services.service_name from first_notification_of_loss join services on first_notification_of_loss.service_id = services.service_id group by first_notification_of_loss.service_id having count ( * ) > 2" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which services have been used more than twice in first notification of loss? Return the service name. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select services.service_name from first_notification_of_loss join services on first_notification_of_loss.service_id = services.service_id group by first_notification_of_loss.service_id having count ( * ) > 2" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the effective date of the claim that has the largest amount of total settlement? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select claims.effective_date from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by sum ( settlements.settlement_amount ) desc limit 1" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the claim that has the largest total settlement amount. Return the effective date of the claim. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select claims.effective_date from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by sum ( settlements.settlement_amount ) desc limit 1" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many policies are listed for the customer named \"Dayana Robel\"? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name = 'Dayana Robel'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of policies used by the customer named \"Dayana Robel\". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name = 'Dayana Robel'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer who has the most policies listed? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join customers_policies on customers.customer_id = customers_policies.customer_id group by customers.customer_name order by count ( * ) desc limit 1" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer uses the most policies? Give me the customer name. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join customers_policies on customers.customer_id = customers_policies.customer_id group by customers.customer_name order by count ( * ) desc limit 1" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the policy types of the customer named \"Dayana Robel\"? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = 'Dayana Robel'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the types of the policy used by the customer named \"Dayana Robel\". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = 'Dayana Robel'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the policy types of the customer that has the most policies listed? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect distinct _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = ( select customers.customer_name from customers join customers_policies on customers.customer_id = customers_policies.customer_id group by customers.customer_name order by count ( * ) desc limit 1 )" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the policy types used by the customer enrolled in the most policies. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect distinct _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select distinct available_policies.policy_type_code from customers join customers_policies on customers.customer_id = customers_policies.customer_id join available_policies on customers_policies.policy_id = available_policies.policy_id where customers.customer_name = ( select customers.customer_name from customers join customers_policies on customers.customer_id = customers_policies.customer_id group by customers.customer_name order by count ( * ) desc limit 1 )" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the services in the alphabetical order. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select service_name from services order by service_name asc" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of all the service names sorted alphabetically. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select service_name from services order by service_name asc" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many services are there? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from services" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of available services. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from services" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of users who do not have a first notification of loss record. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_name from customers except select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers do not have a first notification of loss record? Give me the customer names. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_name from customers except select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who have used either the service \"Close a policy\" or the service \"Upgrade a policy\". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' or services.service_name = 'Upgrade a policy'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have used the service named \"Close a policy\" or \"Upgrade a policy\"? Give me the customer names. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' or services.service_name = 'Upgrade a policy'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who have used both the service \"Close a policy\" and the service \"New policy application\". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' intersect select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'New policy application'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have used both the service named \"Close a policy\" and the service named \"Upgrade a policy\"? Give me the customer names. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'Close a policy' intersect select customers.customer_name from customers join first_notification_of_loss on customers.customer_id = first_notification_of_loss.customer_id join services on first_notification_of_loss.service_id = services.service_id where services.service_name = 'New policy application'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the IDs of customers whose name contains \"Diana\". | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_id from customers where customer_name like '%Diana%'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the IDs of customers who have \"Diana\" in part of their names? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_id from customers where customer_name like '%Diana%'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum settlement amount on record? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( settlement_amount ) , min ( settlement_amount ) from settlements" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum and minimum settlement amount. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( settlement_amount ) , min ( settlement_amount ) from settlements" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the customers in increasing order of IDs. | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select customer_id , customer_name from customers order by customer_id asc" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the ordered list of customer ids? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select customer_id , customer_name from customers order by customer_id asc" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Retrieve the open and close dates of all the policies associated with the customer whose name contains \"Diana\" | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customers_policies.date_opened , customers_policies.date_closed from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name like '%Diana%'" }, { "db_id": "insurance_fnol", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the open and close dates of all the policies used by the customer who have \"Diana\" in part of their names? | customers : customer_id , customer_name | services : service_id , service_name | available_policies : policy_id , policy_type_code , customer_phone | customers_policies : customer_id , policy_id , date_opened , date_closed | first_notification_of_loss : fnol_id , customer_id , policy_id , service_id | claims : claim_id , fnol_id , effective_date | settlements : settlement_id , claim_id , effective_date , settlement_amount | customers_policies.policy_id = available_policies.policy_id | customers_policies.customer_id = customers.customer_id | first_notification_of_loss.customer_id = customers_policies.customer_id | first_notification_of_loss.policy_id = customers_policies.policy_id | first_notification_of_loss.service_id = services.service_id | claims.fnol_id = first_notification_of_loss.fnol_id | settlements.claim_id = claims.claim_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customers_policies.date_opened , customers_policies.date_closed from customers join customers_policies on customers.customer_id = customers_policies.customer_id where customers.customer_name like '%Diana%'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many kinds of enzymes are there? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from enzyme" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total count of enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from enzyme" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of enzymes in descending lexicographical order. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from enzyme order by name desc" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of enzymes in descending order? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from enzyme order by name desc" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and the locations that the enzymes can make an effect. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ | select name , location from enzyme" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and locations of all enzymes listed? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ | select name , location from enzyme" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( omim ) from enzyme" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum OMIM value in the database? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( omim ) from enzyme" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select product , chromosome , porphyria from enzyme where location = 'Cytosol'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select product , chromosome , porphyria from enzyme where location = 'Cytosol'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of enzymes who does not produce 'Heme'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select name from enzyme where product != 'Heme'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of enzymes whose product is not 'Heme'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select name from enzyme where product != 'Heme'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and trade names of the medicines which has 'Yes' value in the FDA record? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select name , trade_name from medicine where fda_approved = 'Yes'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and trade names of the medcines that are FDA approved? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select name , trade_name from medicine where fda_approved = 'Yes'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id join medicine on medicine_enzyme_interaction.medicine_id = medicine.id where medicine.name = 'Amisulpride' and medicine_enzyme_interaction.interaction_type = 'inhibitor'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id join medicine on medicine_enzyme_interaction.medicine_id = medicine.id where medicine.name = 'Amisulpride' and medicine_enzyme_interaction.interaction_type = 'inhibitor'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of the medicine that can interact with two or more enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 2" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For every medicine id, what are the names of the medicines that can interact with more than one enzyme? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 2" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc | select medicine.id , medicine.name , medicine.fda_approved from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id order by count ( * ) desc" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc | select medicine.id , medicine.name , medicine.fda_approved from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id order by count ( * ) desc" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and name of the enzyme with most number of medicines that can interact as 'activator'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select enzyme.id , enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id where medicine_enzyme_interaction.interaction_type = 'activitor' group by enzyme.id order by count ( * ) desc limit 1" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and name of the enzyme that can interact with the most medicines as an activator? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select enzyme.id , enzyme.name from enzyme join medicine_enzyme_interaction on enzyme.id = medicine_enzyme_interaction.enzyme_id where medicine_enzyme_interaction.interaction_type = 'activitor' group by enzyme.id order by count ( * ) desc limit 1" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select medicine_enzyme_interaction.interaction_type from medicine_enzyme_interaction join medicine on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on medicine_enzyme_interaction.enzyme_id = enzyme.id where enzyme.name = 'ALA synthase' and medicine.name = 'Aripiprazole'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ | select medicine_enzyme_interaction.interaction_type from medicine_enzyme_interaction join medicine on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on medicine_enzyme_interaction.enzyme_id = enzyme.id where enzyme.name = 'ALA synthase' and medicine.name = 'Aripiprazole'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common interaction type between enzymes and medicine? And how many are there? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select interaction_type , count ( * ) from medicine_enzyme_interaction group by interaction_type order by count ( * ) desc limit 1" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the most common types of interactions between enzymes and medicine, and how many types are there? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select interaction_type , count ( * ) from medicine_enzyme_interaction group by interaction_type order by count ( * ) desc limit 1" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many medicines have the FDA approval status 'No' ? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from medicine where fda_approved = 'No'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many medicines were not approved by the FDA? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from medicine where fda_approved = 'No'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many enzymes do not have any interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction )" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of enzymes without any interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction )" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and trade name of the medicines can interact with at least 3 enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 3" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and trade names of the medicine that can interact with at least 3 enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select medicine.id , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id group by medicine.id having count ( * ) >= 3" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct enzyme.name , enzyme.location , enzyme.product from enzyme join medicine_enzyme_interaction on medicine_enzyme_interaction.enzyme_id = enzyme.id where medicine_enzyme_interaction.interaction_type = 'inhibitor'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names, locations, and products of the enzymes that are capable inhibitor interactions? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct enzyme.name , enzyme.location , enzyme.product from enzyme join medicine_enzyme_interaction on medicine_enzyme_interaction.enzyme_id = enzyme.id where medicine_enzyme_interaction.interaction_type = 'inhibitor'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'inhibitor' intersect select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'activitor'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'inhibitor' intersect select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id where interaction_type = 'activitor'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name , trade_name from medicine except select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on enzyme.id = medicine_enzyme_interaction.enzyme_id where enzyme.product = 'Protoporphyrinogen IX'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name , trade_name from medicine except select medicine.name , medicine.trade_name from medicine join medicine_enzyme_interaction on medicine_enzyme_interaction.medicine_id = medicine.id join enzyme on enzyme.id = medicine_enzyme_interaction.enzyme_id where enzyme.product = 'Protoporphyrinogen IX'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct FDA approval statuses are there for the medicines? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct fda_approved ) from medicine" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different FDA approval statuses exist for medicines? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct fda_approved ) from medicine" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which enzyme names have the substring \"ALA\"? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from enzyme where name like '%ALA%'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of enzymes that include the string 'ALA'? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from enzyme where name like '%ALA%'" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the number of medicines offered by each trade. | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select trade_name , count ( * ) from medicine group by trade_name" }, { "db_id": "medicine_enzyme_interaction", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many medicines are offered by each trade name? | medicine : id , name , trade_name , fda_approved | enzyme : id , name , location , product , chromosome , omim , porphyria | medicine_enzyme_interaction : enzyme_id , medicine_id , interaction_type | medicine_enzyme_interaction.medicine_id = medicine.id | medicine_enzyme_interaction.enzyme_id = enzyme.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select trade_name , count ( * ) from medicine group by trade_name" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all schools and their nicknames in the order of founded year. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select school , nickname from university order by founded asc" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different schools and their nicknames, ordered by their founding years? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select school , nickname from university order by founded asc" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all public schools and their locations. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ | select school , location from university where affiliation = 'Public'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the public schools and what are their locations? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ | select school , location from university where affiliation = 'Public'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When was the school with the largest enrollment founded? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select founded from university order by enrollment desc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the founded year for the school with the largest enrollment. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select founded from university order by enrollment desc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the founded year of the newest non public school. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select founded from university where affiliation != 'Public' order by founded desc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the founded year of the non public school that was founded most recently? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select founded from university where affiliation != 'Public' order by founded desc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many schools are in the basketball match? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct school_id ) from basketball_match" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of schools that have had basketball matches. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct school_id ) from basketball_match" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the highest acc percent score in the competition? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select acc_percent from basketball_match order by acc_percent desc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the highest acc percent across all basketball matches. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select acc_percent from basketball_match order by acc_percent desc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the primary conference of the school that has the lowest acc percent score in the competition? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select university.primary_conference from university join basketball_match on university.school_id = basketball_match.school_id order by basketball_match.acc_percent asc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the primary conference of the school with the lowest acc percentage score. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select university.primary_conference from university join basketball_match on university.school_id = basketball_match.school_id order by basketball_match.acc_percent asc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the team name and acc regular season score of the school that was founded for the longest time? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select basketball_match.team_name , basketball_match.acc_regular_season from university join basketball_match on university.school_id = basketball_match.school_id order by university.founded asc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the team and the acc during the regular season for the school that was founded the earliest. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select basketball_match.team_name , basketball_match.acc_regular_season from university join basketball_match on university.school_id = basketball_match.school_id order by university.founded asc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the location and all games score of the school that has Clemson as its team name. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ | select basketball_match.all_games , university.location from university join basketball_match on university.school_id = basketball_match.school_id where team_name = 'Clemson'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the all games score and location of the school called Clemson? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ | select basketball_match.all_games , university.location from university join basketball_match on university.school_id = basketball_match.school_id where team_name = 'Clemson'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average enrollment size of the universities that are founded before 1850? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( enrollment ) from university where founded < 1850" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average enrollment of universities founded before 1850. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( enrollment ) from university where founded < 1850" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the enrollment and primary_conference of the oldest college. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select enrollment , primary_conference from university order by founded asc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the enrollment and primary conference for the university which was founded the earliest? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select enrollment , primary_conference from university order by founded asc limit 1" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total and minimum enrollment of all schools? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect sum ( _ ) , min ( _ ) from _ | select sum ( enrollment ) , min ( enrollment ) from university" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the total and minimum enrollments across all schools. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect sum ( _ ) , min ( _ ) from _ | select sum ( enrollment ) , min ( enrollment ) from university" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total student enrollment for different affiliation type schools. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( enrollment ) , affiliation from university group by affiliation" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total enrollments of universities of each affiliation type? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( enrollment ) , affiliation from university group by affiliation" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many schools do not participate in the basketball match? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from university where school_id not in ( select school_id from basketball_match )" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of universities that do not participate in the baketball match. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from university where school_id not in ( select school_id from basketball_match )" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the schools that were either founded after 1850 or public. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ | select school from university where founded > 1850 or affiliation = 'Public'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the schools that were either founded before 1850 or are public? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ | select school from university where founded > 1850 or affiliation = 'Public'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find how many different affiliation types there are. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct affiliation ) from university" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different affiliation types. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct affiliation ) from university" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find how many school locations have the word 'NY'. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from university where location like '%NY%'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many universities have a location that contains NY? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from university where location like '%NY%'" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the team names of the universities whose enrollments are smaller than the average enrollment size. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select basketball_match.team_name from university join basketball_match on university.school_id = basketball_match.school_id where enrollment < ( select avg ( enrollment ) from university )" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of teams from universities that have a below average enrollment? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select basketball_match.team_name from university join basketball_match on university.school_id = basketball_match.school_id where enrollment < ( select avg ( enrollment ) from university )" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of universities that have over a 20000 enrollment size for each affiliation type. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , affiliation from university where enrollment > 20000 group by affiliation" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different affiliations, and how many schools with each have an enrollment size of above 20000? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , affiliation from university where enrollment > 20000 group by affiliation" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ where _ group by _ | select sum ( enrollment ) , affiliation from university where founded > 1850 group by affiliation" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ where _ group by _ | select sum ( enrollment ) , affiliation from university where founded > 1850 group by affiliation" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum enrollment across all schools? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( enrollment ) from university" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the maximum enrollment across all schools. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( enrollment ) from university" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all information regarding the basketball match. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ | select * from basketball_match" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about the basketball match? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ | select * from basketball_match" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List names of all teams in the basketball competition, ordered by all home scores in descending order. | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select team_name from basketball_match order by all_home desc" }, { "db_id": "university_basketball", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the teams in the basketball competition, sorted by all home scores in descending order? | basketball_match : team_id , school_id , team_name , acc_regular_season , acc_percent , acc_home , acc_road , all_games , all_games_percent , all_home , all_road , all_neutral | university : school_id , school , location , founded , affiliation , enrollment , nickname , primary_conference | basketball_match.school_id = university.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select team_name from basketball_match order by all_home desc" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: the names of models that launched between 2002 and 2004. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select model_name from chip_model where launch_year between 2002 and 2004" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which model has the least amount of RAM? List the model name and the amount of RAM. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select model_name , ram_mib from chip_model order by ram_mib asc limit 1" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ | select chip_model , screen_mode from phone where hardware_model_name = 'LG-P760'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many phone hardware models are produced by the company named \"Nokia Corporation\"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from phone where company_name = 'Nokia Corporation'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( chip_model.ram_mib ) , min ( chip_model.ram_mib ) from chip_model join phone on chip_model.model_name = phone.chip_model where phone.company_name = 'Nokia Corporation'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average ROM size of phones produced by the company named \"Nokia Corporation\"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( chip_model.rom_mib ) from chip_model join phone on chip_model.model_name = phone.chip_model where phone.company_name = 'Nokia Corporation'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ | select phone.hardware_model_name , phone.company_name from chip_model join phone on chip_model.model_name = phone.chip_model where chip_model.launch_year = 2002 or chip_model.ram_mib > 32" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ like _ | select hardware_model_name , company_name from phone where accreditation_type like 'Full'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is \"LG-P760\". | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ | select screen_mode.char_cells , screen_mode.pixels , screen_mode.hardware_colours from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.hardware_model_name = 'LG-P760'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the hardware model name and company name for the phone whose screen mode type is \"Graphics.\" | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ | select phone.hardware_model_name , phone.company_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.type = 'Graphics'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc limit _ | select company_name , count ( * ) from phone group by company_name order by count ( * ) asc limit 1" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the company that produced more than one phone model. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select company_name from phone group by company_name having count ( * ) > 1" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the maximum, minimum and average number of used kb in screen mode. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( used_kb ) , min ( used_kb ) , avg ( used_kb ) from screen_mode" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the phone model launched in year 2002 and with the highest RAM size. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select phone.hardware_model_name from chip_model join phone on chip_model.model_name = phone.chip_model where chip_model.launch_year = 2002 order by chip_model.ram_mib desc limit 1" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the wifi and screen mode type of the hardware model named \"LG-P760\"? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ | select chip_model.wifi , screen_mode.type from chip_model join phone on chip_model.model_name = phone.chip_model join screen_mode on phone.screen_mode = screen_mode.graphics_mode where phone.hardware_model_name = 'LG-P760'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the hardware model name for the phones that have screen mode type \"Text\" or RAM size greater than 32. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ | select phone.hardware_model_name from chip_model join phone on chip_model.model_name = phone.chip_model join screen_mode on phone.screen_mode = screen_mode.graphics_mode where screen_mode.type = 'Text' or chip_model.ram_mib > 32" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the hardware model name for the phones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\" | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct phone.hardware_model_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.type = 'Graphics' or phone.company_name = 'Nokia Corporation'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct phone.hardware_model_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.company_name = 'Nokia Corporation' and screen_mode.type != 'Text'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect distinct _ from _ where _ between _ and _ | select distinct phone.hardware_model_name , phone.company_name from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where screen_mode.used_kb between 10 and 15" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of phones for each accreditation type. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select accreditation_type , count ( * ) from phone group by accreditation_type" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many phones belongs to each accreditation type? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select accreditation_type , count ( * ) from phone group by accreditation_type" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the accreditation level that more than 3 phones use. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select accreditation_level from phone group by accreditation_level having count ( * ) > 3" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the details for all chip models. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ | select * from chip_model" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many models do not have the wifi function? | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from chip_model where wifi = 'No'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of chip model that do not have wifi. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from chip_model where wifi = 'No'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the model names sorted by their launch year. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ order by _ asc | select model_name from chip_model order by launch_year asc" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average ram mib size of the chip models that are never used by any phone. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ ) | select avg ( ram_mib ) from chip_model where model_name not in ( select chip_model from phone )" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the chip models that are not used by any phone with full accreditation type. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select model_name from chip_model except select chip_model from phone where accreditation_type = 'Full'" }, { "db_id": "phone_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types. | chip_model : model_name , launch_year , ram_mib , rom_mib , slots , wifi , bluetooth | screen_mode : graphics_mode , char_cells , pixels , hardware_colours , used_kb , map , type | phone : company_name , hardware_model_name , accreditation_type , accreditation_level , date , chip_model , screen_mode | phone.chip_model = chip_model.model_name | phone.screen_mode = screen_mode.graphics_mode | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select screen_mode.pixels from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.accreditation_type = 'Provisional' intersect select screen_mode.pixels from screen_mode join phone on screen_mode.graphics_mode = phone.screen_mode where phone.accreditation_type = 'Full'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many countries are there in total? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from country" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of countries. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from country" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the country name and capital of all countries. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select country_name , capital from country" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and capitals of each country? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select country_name , capital from country" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all official native languages that contain the word \"English\". | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select official_native_language from country where official_native_language like '%English%'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the official native languages that contain the string \"English\". | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select official_native_language from country where official_native_language like '%English%'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct positions of matches. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct position from match_season" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different positions for match season? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct position from match_season" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the players from college UCLA. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select player from match_season where college = 'UCLA'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the players from UCLA? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select player from match_season where college = 'UCLA'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct position of players from college UCLA or Duke. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct position from match_season where college = 'UCLA' or college = 'Duke'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different positions of players from UCLA or Duke colleges? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct position from match_season where college = 'UCLA' or college = 'Duke'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the draft pick numbers and draft classes of players whose positions are defenders. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select draft_pick_number , draft_class from match_season where position = 'Defender'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the draft pick numbers and draft classes for players who play the Defender position? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select draft_pick_number , draft_class from match_season where position = 'Defender'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct teams are involved in match seasons? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct team ) from match_season" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different teams involved in match season. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct team ) from match_season" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the players and the years played. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select player , years_played from player" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the different players and how many years has each played? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select player , years_played from player" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all team names. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select name from team" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all teams? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select name from team" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the season, the player, and the name of the country that player belongs to. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select match_season.season , match_season.player , country.country_name from country join match_season on country.country_id = match_season.country" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each player, what are their name, season, and country that they belong to? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select match_season.season , match_season.player , country.country_name from country join match_season on country.country_id = match_season.country" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which players are from Indonesia? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select match_season.player from country join match_season on country.country_id = match_season.country where country.country_name = 'Indonesia'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the players from Indonesia? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select match_season.player from country join match_season on country.country_id = match_season.country where country.country_name = 'Indonesia'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct positions of the players from a country whose capital is Dublin? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct match_season.position from country join match_season on country.country_id = match_season.country where country.capital = 'Dublin'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the different positions of players who play for the country with the capital Dublin. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct match_season.position from country join match_season on country.country_id = match_season.country where country.capital = 'Dublin'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the official languages of the countries of players from Maryland or Duke college? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select country.official_native_language from country join match_season on country.country_id = match_season.country where match_season.college = 'Maryland' or match_season.college = 'Duke'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the official native languages of countries who have players from Maryland or Duke colleges. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select country.official_native_language from country join match_season on country.country_id = match_season.country where match_season.college = 'Maryland' or match_season.college = 'Duke'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct official languages are there among countries of players whose positions are defenders. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct country.official_native_language ) from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different official languages corresponding to countries that players who play Defender are from. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct country.official_native_language ) from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the season, the player, and the name of the team that players belong to. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select match_season.season , match_season.player , team.name from match_season join team on match_season.team = team.team_id" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the different players, what season do they play in, and what is the name of the team they are on? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ | select match_season.season , match_season.player , team.name from match_season join team on match_season.team = team.team_id" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the positions of the players from the team with name \"Ryley Goldner\". | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select match_season.position from match_season join team on match_season.team = team.team_id where team.name = 'Ryley Goldner'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the positions of players on the team Ryley Goldner. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select match_season.position from match_season join team on match_season.team = team.team_id where team.name = 'Ryley Goldner'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct colleges are associated with players from the team with name \"Columbus Crew\". | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct match_season.college ) from match_season join team on match_season.team = team.team_id where team.name = 'Columbus Crew'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different colleges that players who play for Columbus Crew are from. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct match_season.college ) from match_season join team on match_season.team = team.team_id where team.name = 'Columbus Crew'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the players and years played for players from team \"Columbus Crew\". | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select player.player , player.years_played from player join team on player.team = team.team_id where team.name = 'Columbus Crew'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the players who played for Columbus Crew, and how many years did each play for? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select player.player , player.years_played from player join team on player.team = team.team_id where team.name = 'Columbus Crew'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the position of players and the corresponding number of players. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select position , count ( * ) from match_season group by position" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players played each position? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select position , count ( * ) from match_season group by position" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the country names and the corresponding number of players. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country_name , count ( * ) from country join match_season on country.country_id = match_season.country group by country.country_name" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players are from each country? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country_name , count ( * ) from country join match_season on country.country_id = match_season.country group by country.country_name" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all players sorted by college in ascending alphabetical order. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select player from match_season order by college asc" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the players who played in match season, sorted by college in ascending alphabetical order? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select player from match_season order by college asc" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common position of players in match seasons. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select position from match_season group by position order by count ( * ) desc limit 1" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the position that is most common among players in match seasons? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select position from match_season group by position order by count ( * ) desc limit 1" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the top 3 most common colleges of players in match seasons. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select college from match_season group by college order by count ( * ) desc limit 3" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the three colleges from which the most players are from? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select college from match_season group by college order by count ( * ) desc limit 3" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of colleges that have at least two players. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select college from match_season group by college having count ( * ) >= 2" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all colleges that have two or more players? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select college from match_season group by college having count ( * ) >= 2" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of colleges that have at least two players in descending alphabetical order. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ order by _ desc | select college from match_season group by college having count ( * ) >= 2 order by college desc" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of colleges that have two or more players, listed in descending alphabetical order? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ order by _ desc | select college from match_season group by college having count ( * ) >= 2 order by college desc" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of teams that do no have match season record? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from team where team_id not in ( select team from match_season )" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of teams that have no match season record. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from team where team_id not in ( select team from match_season )" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of countries that have both players with position forward and players with position defender? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Forward' intersect select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of countries that have players that play the Forward position, as well as players who play the Defender position. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Forward' intersect select country.country_name from country join match_season on country.country_id = match_season.country where match_season.position = 'Defender'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which college have both players with position midfielder and players with position defender? | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select college from match_season where position = 'Midfielder' intersect select college from match_season where position = 'Defender'" }, { "db_id": "match_season", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position. | country : country_id , country_name , capital , official_native_language | team : team_id , name | match_season : season , player , position , country , team , draft_pick_number , draft_class , college | player : player_id , player , years_played , total_wl , singles_wl , doubles_wl , team | match_season.team = team.team_id | match_season.country = country.country_id | player.team = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select college from match_season where position = 'Midfielder' intersect select college from match_season where position = 'Defender'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many climbers are there? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from climber" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of climbers. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from climber" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of climbers in descending order of points. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from climber order by points desc" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the climbers, ordered by points descending? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from climber order by points desc" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of climbers whose country is not Switzerland. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select name from climber where country != 'Switzerland'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of climbers who are not from the country of Switzerland? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select name from climber where country != 'Switzerland'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum point for climbers whose country is United Kingdom? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( points ) from climber where country = 'United Kingdom'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the maximum number of points for climbers from the United Kingdom. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( points ) from climber where country = 'United Kingdom'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct countries are the climbers from? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct country ) from climber" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different countries that climbers are from. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct country ) from climber" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of mountains in ascending alphabetical order? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from mountain order by name asc" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names of mountains in alphabetical order. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from mountain order by name asc" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries of mountains with height bigger than 5000? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select country from mountain where height > 5000" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the countries of the mountains that have a height larger than 5000. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select country from mountain where height > 5000" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the highest mountain? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from mountain order by height desc limit 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the mountain with the greatest height. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from mountain order by height desc limit 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct ranges of the mountains with the top 3 prominence. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect distinct _ from _ order by _ desc limit _ | select distinct range from mountain order by prominence desc limit 3" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different ranges of the 3 mountains with the highest prominence? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect distinct _ from _ order by _ desc limit _ | select distinct range from mountain order by prominence desc limit 3" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of climbers and the names of mountains they climb. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ | select climber.name , mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of climbers and the corresponding names of mountains that they climb? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ | select climber.name , mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of climbers and the heights of mountains they climb. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ | select climber.name , mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of climbers and the corresponding heights of the mountains that they climb? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ | select climber.name , mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the height of the mountain climbed by the climber with the maximum points. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id order by climber.points desc limit 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the height of the mountain climbined by the climbing who had the most points? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select mountain.height from climber join mountain on climber.mountain_id = mountain.mountain_id order by climber.points desc limit 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct names of mountains climbed by climbers from country \"West Germany\". | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id where climber.country = 'West Germany'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of mountains ascended by climbers from the country of West Germany? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct mountain.name from climber join mountain on climber.mountain_id = mountain.mountain_id where climber.country = 'West Germany'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the times used by climbers to climb mountains in Country Uganda. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select climber.time from climber join mountain on climber.mountain_id = mountain.mountain_id where mountain.country = 'Uganda'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the times used by climbers who climbed mountains in the country of Uganda? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select climber.time from climber join mountain on climber.mountain_id = mountain.mountain_id where mountain.country = 'Uganda'" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the countries and the number of climbers from each country. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country , count ( * ) from climber group by country" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many climbers are from each country? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country , count ( * ) from climber group by country" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the countries that have more than one mountain. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select country from mountain group by country having count ( * ) > 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which countries have more than one mountain? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select country from mountain group by country having count ( * ) > 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of mountains that do not have any climber. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from mountain where mountain_id not in ( select mountain_id from climber )" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of countains that no climber has climbed? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from mountain where mountain_id not in ( select mountain_id from climber )" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country from mountain where height > 5600 intersect select country from mountain where height < 5200" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries that have both mountains that are higher than 5600 and lower than 5200? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country from mountain where height > 5600 intersect select country from mountain where height < 5200" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the range that has the most number of mountains. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select range from mountain group by range order by count ( * ) desc limit 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which range contains the most mountains? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select range from mountain group by range order by count ( * ) desc limit 1" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of mountains with height more than 5000 or prominence more than 1000. | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select name from mountain where height > 5000 or prominence > 1000" }, { "db_id": "climbing", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of mountains that have a height of over 5000 or a prominence of over 1000? | mountain : mountain_id , name , height , prominence , range , country | climber : climber_id , name , country , time , points , mountain_id | climber.mountain_id = mountain.mountain_id | \n\n### Response:\n\nselect _ from _ where _ | select name from mountain where height > 5000 or prominence > 1000" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many body builders are there? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from body_builder" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the total scores of body builders in ascending order. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select total from body_builder order by total asc" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the snatch score and clean jerk score of body builders in ascending order of snatch score. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select snatch , clean_jerk from body_builder order by snatch asc" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average snatch score of body builders? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( snatch ) from body_builder" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the clean and jerk score of the body builder with the highest total score? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select clean_jerk from body_builder order by total desc limit 1" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the birthdays of people in ascending order of height? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select birth_date from people order by height asc" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of body builders? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select people.name from body_builder join people on body_builder.people_id = people.people_id" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of body builders whose total score is higher than 300? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from body_builder join people on body_builder.people_id = people.people_id where body_builder.total > 300" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the body builder with the greatest body weight? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select people.name from body_builder join people on body_builder.people_id = people.people_id order by people.weight desc limit 1" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the birth date and birth place of the body builder with the highest total points? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select people.birth_date , people.birth_place from body_builder join people on body_builder.people_id = people.people_id order by body_builder.total desc limit 1" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the heights of body builders with total score smaller than 315? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.height from body_builder join people on body_builder.people_id = people.people_id where body_builder.total < 315" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average total score of body builders with height bigger than 200? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( body_builder.total ) from body_builder join people on body_builder.people_id = people.people_id where people.height > 200" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of body builders in descending order of total scores? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select people.name from body_builder join people on body_builder.people_id = people.people_id order by body_builder.total desc" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List each birth place along with the number of people from there. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select birth_place , count ( * ) from people group by birth_place" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common birth place of people? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select birth_place from people group by birth_place order by count ( * ) desc limit 1" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the birth places that are shared by at least two people? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select birth_place from people group by birth_place having count ( * ) >= 2" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the height and weight of people in descending order of height. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select height , weight from people order by height desc" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all information about each body builder. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select * from body_builder" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and origins of people who are not body builders. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name , birth_place from people except select people.name , people.birth_place from people join body_builder on people.people_id = body_builder.people_id" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct birth places are there? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct birth_place ) from people" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many persons are not body builders? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from people where people_id not in ( select people_id from body_builder )" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200. | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.weight from body_builder join people on body_builder.people_id = people.people_id where body_builder.snatch > 140 or people.height > 200" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total scores of the body builders whose birthday contains the string \"January\" ? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select body_builder.total from body_builder join people on body_builder.people_id = people.people_id where people.birth_date like '%January%'" }, { "db_id": "body_builder", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the minimum snatch score? | body_builder : body_builder_id , people_id , snatch , clean_jerk , total | people : people_id , name , height , weight , birth_date , birth_place | body_builder.people_id = people.people_id | \n\n### Response:\n\nselect min ( _ ) from _ | select min ( snatch ) from body_builder" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many elections are there? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from election" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the votes of elections in descending order. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select votes from election order by votes desc" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the dates and vote percents of elections. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ | select date , vote_percent from election" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the minimum and maximum vote percents of elections? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ | select min ( vote_percent ) , max ( vote_percent ) from election" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and parties of representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ | select name , party from representative" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of representatives whose party is not \"Republican\"? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ where _ | select name from representative where party != 'Republican'" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the life spans of representatives from New York state or Indiana state? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ where _ | select lifespan from representative where state = 'New York' or state = 'Indiana'" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of representatives and the dates of elections they participated in. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ | select representative.name , election.date from election join representative on election.representative_id = representative.representative_id" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of representatives with more than 10000 votes in election? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ where _ | select representative.name from election join representative on election.representative_id = representative.representative_id where votes > 10000" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of representatives in descending order of votes? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select representative.name from election join representative on election.representative_id = representative.representative_id order by votes desc" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the party of the representative that has the smallest number of votes. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select representative.party from election join representative on election.representative_id = representative.representative_id order by votes asc limit 1" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the lifespans of representatives in descending order of vote percent? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select representative.lifespan from election join representative on election.representative_id = representative.representative_id order by vote_percent desc" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of votes of representatives from party \"Republican\"? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( election.votes ) from election join representative on election.representative_id = representative.representative_id where representative.party = 'Republican'" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different parties of representative? Show the party name and the number of representatives in each party. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party , count ( * ) from representative group by party" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the party that has the largest number of representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select party , count ( * ) from representative group by party order by count ( * ) desc limit 1" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What parties have at least three representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select party from representative group by party having count ( * ) >= 3" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What states have at least two representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select state from representative group by state having count ( * ) >= 2" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of representatives that have not participated in elections listed here. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from representative where representative_id not in ( select representative_id from election )" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the parties that have both representatives in New York state and representatives in Pennsylvania state. | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select party from representative where state = 'New York' intersect select party from representative where state = 'Pennsylvania'" }, { "db_id": "election_representative", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct parties are there for representatives? | election : election_id , representative_id , date , votes , vote_percent , seats , place | representative : representative_id , name , state , party , lifespan | election.representative_id = representative.representative_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct party ) from representative" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many apartment bookings are there in total? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from apartment_bookings" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of apartment bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from apartment_bookings" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the start dates and end dates of all the apartment bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select booking_start_date , booking_end_date from apartment_bookings" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the start date and end date of each apartment booking? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select booking_start_date , booking_end_date from apartment_bookings" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct building descriptions. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct building_description from apartment_buildings" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of all the distinct building descriptions. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct building_description from apartment_buildings" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the short names of the buildings managed by \"Emma\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select building_short_name from apartment_buildings where building_manager = 'Emma'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which buildings does \"Emma\" manage? Give me the short names of the buildings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select building_short_name from apartment_buildings where building_manager = 'Emma'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the addresses and phones of all the buildings managed by \"Brenden\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select building_address , building_phone from apartment_buildings where building_manager = 'Brenden'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the address and phone number of the buildings managed by \"Brenden\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select building_address , building_phone from apartment_buildings where building_manager = 'Brenden'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the building full names that contain the word \"court\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select building_full_name from apartment_buildings where building_full_name like '%court%'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the building full names containing the word \"court\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select building_full_name from apartment_buildings where building_full_name like '%court%'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the minimum and maximum number of bathrooms of all the apartments? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ | select min ( bathroom_count ) , max ( bathroom_count ) from apartments" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the minimum and maximum bathroom count among all the apartments. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ | select min ( bathroom_count ) , max ( bathroom_count ) from apartments" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of bedrooms of all apartments? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( bedroom_count ) from apartments" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average number of bedrooms of all the apartments. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( bedroom_count ) from apartments" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the apartment number and the number of rooms for each apartment. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select apt_number , room_count from apartments" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the apartment number and the room count of each apartment? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select apt_number , room_count from apartments" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of rooms of apartments with type code \"Studio\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( room_count ) from apartments where apt_type_code = 'Studio'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average room count of the apartments that have the \"Studio\" type code. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( room_count ) from apartments where apt_type_code = 'Studio'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the apartment numbers of the apartments with type code \"Flat\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apt_number from apartments where apt_type_code = 'Flat'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which apartments have type code \"Flat\"? Give me their apartment numbers. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apt_number from apartments where apt_type_code = 'Flat'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the first names and last names of all guests | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select guest_first_name , guest_last_name from guests" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and last names of all the guests? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select guest_first_name , guest_last_name from guests" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the date of birth for all the guests with gender code \"Male\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_birth from guests where gender_code = 'Male'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are dates of birth of all the guests whose gender is \"Male\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_birth from guests where gender_code = 'Male'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the apartment numbers, start dates, and end dates of all the apartment bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select apartments.apt_number , apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the apartment number, start date, and end date of each apartment booking? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select apartments.apt_number , apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the booking start and end dates of the apartments with type code \"Duplex\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartments.apt_type_code = 'Duplex'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the booking start date and end date for the apartments that have type code \"Duplex\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartments.apt_type_code = 'Duplex'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the booking start and end dates of the apartments with more than 2 bedrooms? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartments.bedroom_count > 2" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the booking start date and end date for the apartments that have more than two bedrooms. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartments.bedroom_count > 2" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the booking status code of the apartment with apartment number \"Suite 634\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_status_code from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartments.apt_number = 'Suite 634'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the booking status code for the apartment with number \"Suite 634\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_status_code from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartments.apt_number = 'Suite 634'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct apartment numbers of the apartments that have bookings with status code \"Confirmed\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct apartments.apt_number from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Confirmed'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which apartments have bookings with status code \"Confirmed\"? Return their apartment numbers. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct apartments.apt_number from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Confirmed'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average room count of the apartments that have booking status code \"Provisional\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( room_count ) from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Provisional'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average room count of the apartments whose booking status code is \"Provisional\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( room_count ) from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Provisional'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the guest first names, start dates, and end dates of all the apartment bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select guests.guest_first_name , apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join guests on apartment_bookings.guest_id = guests.guest_id" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the guest first name, start date, and end date of each apartment booking? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ | select guests.guest_first_name , apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join guests on apartment_bookings.guest_id = guests.guest_id" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the start dates and end dates of all the apartment bookings made by guests with gender code \"Female\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join guests on apartment_bookings.guest_id = guests.guest_id where guests.gender_code = 'Female'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the start date and end date of the apartment bookings made by female guests (gender code \"Female\")? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_bookings.booking_start_date , apartment_bookings.booking_start_date from apartment_bookings join guests on apartment_bookings.guest_id = guests.guest_id where guests.gender_code = 'Female'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the first names and last names of all the guests that have apartment bookings with status code \"Confirmed\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select guests.guest_first_name , guests.guest_last_name from apartment_bookings join guests on apartment_bookings.guest_id = guests.guest_id where apartment_bookings.booking_status_code = 'Confirmed'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which guests have apartment bookings with status code \"Confirmed\"? Return their first names and last names. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select guests.guest_first_name , guests.guest_last_name from apartment_bookings join guests on apartment_bookings.guest_id = guests.guest_id where apartment_bookings.booking_status_code = 'Confirmed'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the facility codes of apartments with more than 4 bedrooms. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_facilities.facility_code from apartment_facilities join apartments on apartment_facilities.apt_id = apartments.apt_id where apartments.bedroom_count > 4" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the facility codes of the apartments with more than four bedrooms? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_facilities.facility_code from apartment_facilities join apartments on apartment_facilities.apt_id = apartments.apt_id where apartments.bedroom_count > 4" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the total number of rooms of all apartments with facility code \"Gym\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( apartments.room_count ) from apartment_facilities join apartments on apartment_facilities.apt_id = apartments.apt_id where apartment_facilities.facility_code = 'Gym'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of rooms in the apartments that have facility code \"Gym\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( apartments.room_count ) from apartment_facilities join apartments on apartment_facilities.apt_id = apartments.apt_id where apartment_facilities.facility_code = 'Gym'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the total number of rooms of the apartments in the building with short name \"Columbus Square\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( apartments.room_count ) from apartment_buildings join apartments on apartment_buildings.building_id = apartments.building_id where apartment_buildings.building_short_name = 'Columbus Square'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( apartments.room_count ) from apartment_buildings join apartments on apartment_buildings.building_id = apartments.building_id where apartment_buildings.building_short_name = 'Columbus Square'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the addresses of the buildings that have apartments with more than 2 bathrooms. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_buildings.building_address from apartment_buildings join apartments on apartment_buildings.building_id = apartments.building_id where apartments.bathroom_count > 2" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartment_buildings.building_address from apartment_buildings join apartments on apartment_buildings.building_id = apartments.building_id where apartments.bathroom_count > 2" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the apartment type codes and apartment numbers in the buildings managed by \"Kyle\". | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartments.apt_type_code , apartments.apt_number from apartment_buildings join apartments on apartment_buildings.building_id = apartments.building_id where apartment_buildings.building_manager = 'Kyle'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What apartment type codes and apartment numbers do the buildings managed by \"Kyle\" have? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ | select apartments.apt_type_code , apartments.apt_number from apartment_buildings join apartments on apartment_buildings.building_id = apartments.building_id where apartment_buildings.building_manager = 'Kyle'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the booking status code and the corresponding number of bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select booking_status_code , count ( * ) from apartment_bookings group by booking_status_code" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many bookings does each booking status have? List the booking status code and the number of corresponding bookings. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select booking_status_code , count ( * ) from apartment_bookings group by booking_status_code" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all the apartment numbers sorted by the room count in ascending order. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select apt_number from apartments order by room_count asc" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the apartment numbers in ascending order of room count. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select apt_number from apartments order by room_count asc" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the apartment number with the largest number of bedrooms. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select apt_number from apartments order by bedroom_count desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the apartment number of the apartment with the most beds? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select apt_number from apartments order by bedroom_count desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select apt_type_code , count ( * ) from apartments group by apt_type_code order by count ( * ) asc" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select apt_type_code , count ( * ) from apartments group by apt_type_code order by count ( * ) asc" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the top 3 apartment type codes sorted by the average number of rooms in descending order. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select apt_type_code from apartments group by apt_type_code order by avg ( room_count ) desc limit 3" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the top three apartment types in terms of the average room count? Give me the | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select apt_type_code from apartments group by apt_type_code order by avg ( room_count ) desc limit 3" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select apt_type_code , bathroom_count , bedroom_count from apartments group by apt_type_code order by sum ( room_count ) desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select apt_type_code , bathroom_count , bedroom_count from apartments group by apt_type_code order by sum ( room_count ) desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common apartment type code. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select apt_type_code from apartments group by apt_type_code order by count ( * ) desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which apartment type code appears the most often? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select apt_type_code from apartments group by apt_type_code order by count ( * ) desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common apartment type code among apartments with more than 1 bathroom. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select apt_type_code from apartments where bathroom_count > 1 group by apt_type_code order by count ( * ) desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which apartment type code is the most common among apartments with more than one bathroom? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select apt_type_code from apartments where bathroom_count > 1 group by apt_type_code order by count ( * ) desc limit 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each apartment type code, and the maximum and minimum number of rooms for each type. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , max ( _ ) , min ( _ ) from _ group by _ | select apt_type_code , max ( room_count ) , min ( room_count ) from apartments group by apt_type_code" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return each apartment type code along with the maximum and minimum number of rooms among each type. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , max ( _ ) , min ( _ ) from _ group by _ | select apt_type_code , max ( room_count ) , min ( room_count ) from apartments group by apt_type_code" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each gender code and the corresponding count of guests sorted by the count in descending order. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select gender_code , count ( * ) from guests group by gender_code order by count ( * ) desc" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select gender_code , count ( * ) from guests group by gender_code order by count ( * ) desc" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many apartments do not have any facility? | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from apartments where apt_id not in ( select apt_id from apartment_facilities )" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of apartments that have no facility. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from apartments where apt_id not in ( select apt_id from apartment_facilities )" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the apartment numbers of apartments with bookings that have status code both \"Provisional\" and \"Confirmed\" | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select apartments.apt_number from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Confirmed' intersect select apartments.apt_number from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Provisional'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which apartments have bookings with both status codes \"Provisional\" and \"Confirmed\"? Give me the apartment numbers. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select apartments.apt_number from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Confirmed' intersect select apartments.apt_number from apartment_bookings join apartments on apartment_bookings.apt_id = apartments.apt_id where apartment_bookings.booking_status_code = 'Provisional'" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the apartment numbers of apartments with unit status availability of both 0 and 1. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select apartments.apt_number from apartments join view_unit_status on apartments.apt_id = view_unit_status.apt_id where view_unit_status.available_yn = 0 intersect select apartments.apt_number from apartments join view_unit_status on apartments.apt_id = view_unit_status.apt_id where view_unit_status.available_yn = 1" }, { "db_id": "apartment_rentals", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which apartments have unit status availability of both 0 and 1? Return their apartment numbers. | apartment_buildings : building_id , building_short_name , building_full_name , building_description , building_address , building_manager , building_phone | apartments : apt_id , building_id , apt_type_code , apt_number , bathroom_count , bedroom_count , room_count | apartment_facilities : apt_id , facility_code | guests : guest_id , gender_code , guest_first_name , guest_last_name , date_of_birth | apartment_bookings : apt_booking_id , apt_id , guest_id , booking_status_code , booking_start_date , booking_end_date | view_unit_status : apt_id , apt_booking_id , status_date , available_yn | apartments.building_id = apartment_buildings.building_id | apartment_facilities.apt_id = apartments.apt_id | apartment_bookings.guest_id = guests.guest_id | apartment_bookings.apt_id = apartments.apt_id | view_unit_status.apt_booking_id = apartment_bookings.apt_booking_id | view_unit_status.apt_id = apartments.apt_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select apartments.apt_number from apartments join view_unit_status on apartments.apt_id = view_unit_status.apt_id where view_unit_status.available_yn = 0 intersect select apartments.apt_number from apartments join view_unit_status on apartments.apt_id = view_unit_status.apt_id where view_unit_status.available_yn = 1" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games are held after season 2007? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from game where season > 2007" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the dates of games by the home team name in descending order. | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select date from game order by home_team desc" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the season, home team, away team of all the games. | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ | select season , home_team , away_team from game" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum, minimum and average home games each stadium held? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( home_games ) , min ( home_games ) , avg ( home_games ) from stadium" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average attendance of stadiums with capacity percentage higher than 100%? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ where _ | select average_attendance from stadium where capacity_percentage > 100" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ where _ | select player , number_of_matches , source from injury_accident where injury != 'Knee problem'" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the season of the game which causes the player 'Walter Samuel' to get injured? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ where _ | select game.season from game join injury_accident on game.id = injury_accident.game_id where injury_accident.player = 'Walter Samuel'" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, scores, and dates of the games which caused at least two injury accidents? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select game.id , game.score , game.date from game join injury_accident on injury_accident.game_id = game.id group by game.id having count ( * ) >= 2" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and name of the stadium where the most injury accidents happened? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select stadium.id , stadium.name from stadium join game on stadium.id = game.stadium_id join injury_accident on game.id = injury_accident.game_id group by stadium.id order by count ( * ) desc limit 1" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and name of the stadium where the largest number of injury accidents occurred. | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select stadium.id , stadium.name from stadium join game on stadium.id = game.stadium_id join injury_accident on game.id = injury_accident.game_id group by stadium.id order by count ( * ) desc limit 1" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ where _ | select game.season , stadium.name from game join stadium on game.stadium_id = stadium.id join injury_accident on game.id = injury_accident.game_id where injury_accident.injury = 'Foot injury' or injury_accident.injury = 'Knee problem'" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different kinds of information sources are there for injury accidents? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct source ) from injury_accident" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games are free of injury accidents? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from game where id not in ( select game_id from injury_accident )" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct kinds of injuries happened after season 2010? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct injury_accident.injury ) from injury_accident join game on injury_accident.game_id = game.id where game.season > 2010" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured. | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select stadium.name from game join stadium on game.stadium_id = stadium.id join injury_accident on game.id = injury_accident.game_id where injury_accident.player = 'Walter Samuel' intersect select stadium.name from game join stadium on game.stadium_id = stadium.id join injury_accident on game.id = injury_accident.game_id where injury_accident.player = 'Thiago Motta'" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, average attendance, total attendance for stadiums where no accidents happened. | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name , average_attendance , total_attendance from stadium except select stadium.name , stadium.average_attendance , stadium.total_attendance from game join stadium on game.stadium_id = stadium.id join injury_accident on game.id = injury_accident.game_id" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which stadium name contains the substring \"Bank\"? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from stadium where name like '%Bank%'" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games has each stadium held? | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select stadium.id , count ( * ) from stadium join game on stadium.id = game.stadium_id group by stadium.id" }, { "db_id": "game_injury", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season. | stadium : id , name , home_games , average_attendance , total_attendance , capacity_percentage | game : stadium_id , id , season , date , home_team , away_team , score , competition | injury_accident : game_id , id , player , injury , number_of_matches , source | game.stadium_id = stadium.id | injury_accident.game_id = game.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select game.date , injury_accident.player from game join injury_accident on game.id = injury_accident.game_id order by game.season desc" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all country and league names. | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect _ from _ | select country.name , league.name from country join league on country.id = league.country_id" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many leagues are there in England? | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from country join league on country.id = league.country_id where country.name = 'England'" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average weight of all players? | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( weight ) from player" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum and minimum height of all players? | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( weight ) , min ( weight ) from player" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all player names who have an overall rating higher than the average. | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select avg ( _ ) from _ ) | select distinct player.player_name from player join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.overall_rating > ( select avg ( overall_rating ) from player_attributes )" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of players who have the best dribbling? | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect distinct _ from _ where _ = ( select max ( _ ) from _ ) | select distinct player.player_name from player join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.dribbling = ( select max ( overall_rating ) from player_attributes )" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all players who have a crossing score higher than 90 and prefer their right foot. | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct player.player_name from player join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.crossing > 90 and player_attributes.preferred_foot = 'right'" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all left-footed players who have overall rating between 85 and 90. | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct player.player_name from player join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.preferred_foot = 'left' and player_attributes.overall_rating >= 85 and player_attributes.overall_rating <= 90" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average rating for right-footed players and left-footed players? | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select preferred_foot , avg ( overall_rating ) from player_attributes group by preferred_foot" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Of all players with an overall rating greater than 80, how many are right-footed and left-footed? | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select preferred_foot , count ( * ) from player_attributes where overall_rating > 80 group by preferred_foot" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all of the player ids with a height of at least 180cm and an overall rating higher than 85. | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select player_api_id from player where height >= 180 intersect select player_api_id from player_attributes where overall_rating > 85" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all of the ids for left-footed players with a height between 180cm and 190cm. | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select player_api_id from player where height >= 180 and height <= 190 intersect select player_api_id from player_attributes where preferred_foot = 'left'" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the top 3 players in terms of overall rating? | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect distinct _ from _ order by _ desc limit _ | select distinct player.player_name from player join player_attributes on player.player_api_id = player_attributes.player_api_id order by overall_rating desc limit 3" }, { "db_id": "soccer_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and birthdays of the top five players in terms of potential. | player_attributes : id , player_fifa_api_id , player_api_id , date , overall_rating , potential , preferred_foot , attacking_work_rate , defensive_work_rate , crossing , finishing , heading_accuracy , short_passing , volleys , dribbling , curve , free_kick_accuracy , long_passing , ball_control , acceleration , sprint_speed , agility , reactions , balance , shot_power , jumping , stamina , strength , long_shots , aggression , interceptions , positioning , vision , penalties , marking , standing_tackle , sliding_tackle , gk_diving , gk_handling , gk_kicking , gk_positioning , gk_reflexes | sqlite_sequence : name , seq | player : id , player_api_id , player_name , player_fifa_api_id , birthday , height , weight | league : id , country_id , name | country : id , name | team : id , team_api_id , team_fifa_api_id , team_long_name , team_short_name | team_attributes : id , team_fifa_api_id , team_api_id , date , buildupplayspeed , buildupplayspeedclass , buildupplaydribbling , buildupplaydribblingclass , buildupplaypassing , buildupplaypassingclass , buildupplaypositioningclass , chancecreationpassing , chancecreationpassingclass , chancecreationcrossing , chancecreationcrossingclass , chancecreationshooting , chancecreationshootingclass , chancecreationpositioningclass , defencepressure , defencepressureclass , defenceaggression , defenceaggressionclass , defenceteamwidth , defenceteamwidthclass , defencedefenderlineclass | player_attributes.player_api_id = player.player_api_id | player_attributes.player_fifa_api_id = player.player_fifa_api_id | league.country_id = country.id | team_attributes.team_api_id = team.team_api_id | team_attributes.team_fifa_api_id = team.team_fifa_api_id | \n\n### Response:\n\nselect distinct _ from _ order by _ desc limit _ | select distinct player.player_name , player.birthday from player join player_attributes on player.player_api_id = player_attributes.player_api_id order by potential desc limit 5" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many performances are there? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from performance" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the hosts of performances in ascending order of attendance. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select host from performance order by attendance asc" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates and locations of performances? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ | select date , location from performance" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\" | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select attendance from performance where location = 'TD Garden' or location = 'Bell Centre'" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of attendees for performances? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( attendance ) from performance" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the date of the performance with the highest number of attendees? | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select date from performance order by attendance desc limit 1" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different locations and the number of performances at each location. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select location , count ( * ) from performance group by location" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common location of performances. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select location from performance group by location order by count ( * ) desc limit 1" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the locations that have at least two performances. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select location from performance group by location having count ( * ) >= 2" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select location from performance where attendance > 2000 intersect select location from performance where attendance < 1000" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members and the location of the performances they attended. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ | select member.name , performance.location from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members and the location of performances they attended in ascending alphabetical order of their names. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select member.name , performance.location from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id order by member.name asc" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the dates of performances with attending members whose roles are \"Violin\". | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select performance.date from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id where member.role = 'Violin'" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members and the dates of performances they attended in descending order of attendance of the performances. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select member.name , performance.date from member_attendance join member on member_attendance.member_id = member.member_id join performance on member_attendance.performance_id = performance.performance_id order by performance.attendance desc" }, { "db_id": "performance_attendance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of members who did not attend any performance. | member : member_id , name , nationality , role | performance : performance_id , date , host , location , attendance | member_attendance : member_id , performance_id , num_of_pieces | member_attendance.performance_id = performance.performance_id | member_attendance.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from member where member_id not in ( select member_id from member_attendance )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the buildings which have rooms with capacity more than 50. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct building from classroom where capacity > 50" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct buildings with capacities of greater than 50? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct building from classroom where capacity > 50" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of rooms that are not in the Lamberton building. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from classroom where building != 'Lamberton'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many classrooms are not in Lamberton? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from classroom where building != 'Lamberton'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and building of the departments whose budget is more than the average budget? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select dept_name , building from department where budget > ( select avg ( budget ) from department )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name and building of the departments with greater than average budget. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select dept_name , building from department where budget > ( select avg ( budget ) from department )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the room number of the rooms which can sit 50 to 100 students and their buildings. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select building , room_number from classroom where capacity between 50 and 100" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select building , room_number from classroom where capacity between 50 and 100" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and building of the department with the highest budget. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select dept_name , building from department order by budget desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the department name and corresponding building for the department with the greatest budget? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select dept_name , building from department order by budget desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the student who has the highest total credits in the History department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select name from student where dept_name = 'History' order by tot_cred desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name of the student in the History department with the most credits. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select name from student where dept_name = 'History' order by tot_cred desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms does the Lamberton building have? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from classroom where building = 'Lamberton'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of classrooms in Lamberton. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from classroom where building = 'Lamberton'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students have advisors? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct s_id ) from advisor" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of students who have advisors. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct s_id ) from advisor" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many departments offer courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct dept_name ) from course" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of departments which offer courses. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct dept_name ) from course" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different courses offered by Physics department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct course_id ) from course where dept_name = 'Physics'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of courses in the Physics department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct course_id ) from course where dept_name = 'Physics'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title of courses that have two prerequisites? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select course.title from course join prereq on course.course_id = prereq.course_id group by prereq.course_id having count ( * ) = 2" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles for courses with two prerequisites? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select course.title from course join prereq on course.course_id = prereq.course_id group by prereq.course_id having count ( * ) = 2" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title, credit, and department name of courses that have more than one prerequisites? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select course.title , course.credits , course.dept_name from course join prereq on course.course_id = prereq.course_id group by prereq.course_id having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title, credit value, and department name for courses with more than one prerequisite? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select course.title , course.credits , course.dept_name from course join prereq on course.course_id = prereq.course_id group by prereq.course_id having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses that do not have prerequisite? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from course where course_id not in ( select course_id from prereq )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of courses without prerequisites. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from course where course_id not in ( select course_id from prereq )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the courses that do not have any prerequisite? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from course where course_id not in ( select course_id from prereq )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of courses without prerequisites? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from course where course_id not in ( select course_id from prereq )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different instructors have taught some course? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct id ) from teaches" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct instructors who have taught a course. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct id ) from teaches" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total budgets of the Marketing or Finance department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( budget ) from department where dept_name = 'Marketing' or dept_name = 'Finance'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the sum of budgets of the Marketing and Finance departments? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( budget ) from department where dept_name = 'Marketing' or dept_name = 'Finance'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the department name of the instructor whose name contains 'Soisalon'. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select dept_name from instructor where name like '%Soisalon%'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department with an instructure who has a name like 'Soisalon'? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select dept_name from instructor where name like '%Soisalon%'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms whose capacity is less than 50 does the Lamberton building have? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from classroom where building = 'Lamberton' and capacity < 50" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of rooms in Lamberton with capacity lower than 50. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from classroom where building = 'Lamberton' and capacity < 50" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and budget of departments whose budgets are more than the average budget. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select dept_name , budget from department where budget > ( select avg ( budget ) from department )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and budgets of departments with budgets greater than the average? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select dept_name , budget from department where budget > ( select avg ( budget ) from department )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the name of the instructor who is in Statistics department and earns the lowest salary? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc limit _ | select name from instructor where dept_name = 'Statistics' order by salary asc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name of the lowest earning instructor in the Statistics department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc limit _ | select name from instructor where dept_name = 'Statistics' order by salary asc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title of course that is provided by both Statistics and Psychology departments. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select title from course where dept_name = 'Statistics' intersect select title from course where dept_name = 'Psychology'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of a course that is listed in both the Statistics and Psychology departments? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select title from course where dept_name = 'Statistics' intersect select title from course where dept_name = 'Psychology'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title of course that is provided by Statistics but not Psychology departments. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select title from course where dept_name = 'Statistics' except select title from course where dept_name = 'Psychology'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of courses that are in the Statistics department but not the Psychology department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select title from course where dept_name = 'Statistics' except select title from course where dept_name = 'Psychology'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select id from teaches where semester = 'Fall' and year = 2009 except select id from teaches where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select id from teaches where semester = 'Fall' and year = 2009 except select id from teaches where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of students who took any class in the years of 2009 and 2010. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.name from student join takes on student.id = takes.id where year = 2009 or year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the students who took classes in 2009 or 2010? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.name from student join takes on student.id = takes.id where year = 2009 or year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the top 3 departments that provide the largest amount of courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dept_name from course group by dept_name order by count ( * ) desc limit 3" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the 3 departments with the most courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dept_name from course group by dept_name order by count ( * ) desc limit 3" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the department that offers the highest total credits? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select dept_name from course group by dept_name order by sum ( credits ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department with the most credits? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select dept_name from course group by dept_name order by sum ( credits ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all courses ordered by their titles and credits. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select title from course order by title asc , credits" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Given the titles of all courses, in order of titles and credits. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select title from course order by title asc , credits" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which department has the lowest budget? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select dept_name from department order by budget asc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name of the department with the lowest budget. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select dept_name from department order by budget asc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and buildings of all departments sorted by the budget from large to small. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select dept_name , building from department order by budget desc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and buildings of the deparments, sorted by budget descending? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select dept_name , building from department order by budget desc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the instructor with the highest salary? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from instructor order by salary desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name of the highest paid instructor. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from instructor order by salary desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the information of all instructors ordered by their salary in ascending order. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from instructor order by salary asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give all information regarding instructors, in order of salary from least to greatest. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from instructor order by salary asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the students and their department names sorted by their total credits in ascending order. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , dept_name from student order by tot_cred asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of students and their respective departments, ordered by number of credits from least to greatest? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , dept_name from student order by tot_cred asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list in alphabetic order all course names and their instructors' names in year 2008. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select course.title , instructor.name from course join teaches on course.course_id = teaches.course_id join instructor on teaches.id = instructor.id where year = 2008 order by course.title asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all titles and their instructors' names for courses in 2008, in alphabetical order by title. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select course.title , instructor.name from course join teaches on course.course_id = teaches.course_id join instructor on teaches.id = instructor.id where year = 2008 order by course.title asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of instructors who are advising more than one student. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select instructor.name from instructor join advisor on instructor.id = advisor.i_id group by advisor.i_id having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of instructors who advise more than one student? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select instructor.name from instructor join advisor on instructor.id = advisor.i_id group by advisor.i_id having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the students who have more than one advisor? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select student.name from student join advisor on student.id = advisor.s_id group by advisor.s_id having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of students who have more than one advisor? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select student.name from student join advisor on student.id = advisor.s_id group by advisor.s_id having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms with more than 50 capacity for each building. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , building from classroom where capacity > 50 group by building" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms in each building have a capacity of over 50? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , building from classroom where capacity > 50 group by building" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum and average capacity among rooms in each building. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect max ( _ ) , avg ( _ ) , _ from _ group by _ | select max ( capacity ) , avg ( capacity ) , building from classroom group by building" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the greatest and average capacity for rooms in each building? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect max ( _ ) , avg ( _ ) , _ from _ group by _ | select max ( capacity ) , avg ( capacity ) , building from classroom group by building" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title of the course that is offered by more than one department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select title from course group by title having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of courses that are offered in more than one department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select title from course group by title having count ( * ) > 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total credits of courses provided by different department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( credits ) , dept_name from course group by dept_name" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many total credits are offered by each department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( credits ) , dept_name from course group by dept_name" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the minimum salary for the departments whose average salary is above the average payment of all instructors. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ having avg ( _ ) > ( select avg ( _ ) from _ ) | select min ( salary ) , dept_name from instructor group by dept_name having avg ( salary ) > ( select avg ( salary ) from instructor )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the lowest salary in departments with average salary greater than the overall average. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ having avg ( _ ) > ( select avg ( _ ) from _ ) | select min ( salary ) , dept_name from instructor group by dept_name having avg ( salary ) > ( select avg ( salary ) from instructor )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of courses provided in each semester and year. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , semester , year from section group by semester , year" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses are provided in each semester and year? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , semester , year from section group by semester , year" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the year which offers the largest number of courses. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select year from section group by year order by count ( * ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which year had the greatest number of courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select year from section group by year order by count ( * ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the year and semester when offers the largest number of courses. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select semester , year from section group by semester , year order by count ( * ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the year and semester with the most courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select semester , year from section group by semester , year order by count ( * ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of department has the highest amount of students? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dept_name from student group by dept_name order by count ( * ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the deparment with the highest enrollment? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dept_name from student group by dept_name order by count ( * ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of students in each department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , dept_name from student group by dept_name" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are in each department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , dept_name from student group by dept_name" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the semester and year which has the least number of student taking any class. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select semester , year from takes group by semester , year order by count ( * ) asc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which semeseter and year had the fewest students? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select semester , year from takes group by semester , year order by count ( * ) asc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the instructor who advises of all students from History department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select i_id from advisor join student on advisor.s_id = student.id where student.dept_name = 'History'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give id of the instructor who advises students in the History department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select i_id from advisor join student on advisor.s_id = student.id where student.dept_name = 'History'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and salary of the instructors who are advisors of any student from History department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select instructor.name , instructor.salary from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id where student.dept_name = 'History'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and salaries of instructors who advises students in the History department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select instructor.name , instructor.salary from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id where student.dept_name = 'History'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the courses that do not have any prerequisite? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select course_id from course except select course_id from prereq" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of courses without prerequisites? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select course_id from course except select course_id from prereq" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the courses that do not have any prerequisite? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from course where course_id not in ( select course_id from prereq )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of courses without prerequisites? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from course where course_id not in ( select course_id from prereq )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of the prerequisite class of International Finance course? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select title from course where course_id in ( select prereq.prereq_id from prereq join course on prereq.course_id = course.course_id where course.title = 'International Finance' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the title of the prerequisite to the course International Finance. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select title from course where course_id in ( select prereq.prereq_id from prereq join course on prereq.course_id = course.course_id where course.title = 'International Finance' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title of course whose prerequisite is course Differential Geometry. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select title from course where course_id in ( select prereq.course_id from prereq join course on prereq.prereq_id = course.course_id where course.title = 'Differential Geometry' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of the course with Differential Geometry as a prerequisite? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select title from course where course_id in ( select prereq.course_id from prereq join course on prereq.prereq_id = course.course_id where course.title = 'Differential Geometry' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of students who have taken any course in the fall semester of year 2003. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select name from student where id in ( select id from takes where semester = 'Fall' and year = 2003 )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of students who took a course in the Fall of 2003? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select name from student where id in ( select id from takes where semester = 'Fall' and year = 2003 )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select course.title from course join section on course.course_id = section.course_id where building = 'Chandler' and semester = 'Fall' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the title of the course offered in Chandler during the Fall of 2010. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select course.title from course join section on course.course_id = section.course_id where building = 'Chandler' and semester = 'Fall' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the instructors who taught C Programming course before. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select instructor.name from instructor join teaches on instructor.id = teaches.id join course on teaches.course_id = course.course_id where course.title = 'C Programming'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of instructors who have taught C Programming courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select instructor.name from instructor join teaches on instructor.id = teaches.id join course on teaches.course_id = course.course_id where course.title = 'C Programming'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and salary of instructors who are advisors of the students from the Math department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select instructor.name , instructor.salary from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id where student.dept_name = 'Math'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and salaries of instructors who advise students in the Math department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select instructor.name , instructor.salary from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id where student.dept_name = 'Math'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select instructor.name from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id where student.dept_name = 'Math' order by student.tot_cred asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all instructors who advise students in the math depart sorted by total credits of the student. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select instructor.name from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id where student.dept_name = 'Math' order by student.tot_cred asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the course title of the prerequisite of course Mobile Computing? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select title from course where course_id in ( select prereq.prereq_id from prereq join course on prereq.course_id = course.course_id where course.title = 'Mobile Computing' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of the course that is a prerequisite for Mobile Computing? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select title from course where course_id in ( select prereq.prereq_id from prereq join course on prereq.course_id = course.course_id where course.title = 'Mobile Computing' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of instructor who is the advisor of the student who has the highest number of total credits. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select instructor.name from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id order by student.tot_cred desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the instructor who advises the student with the greatest number of total credits? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select instructor.name from advisor join instructor on advisor.i_id = instructor.id join student on advisor.s_id = student.id order by student.tot_cred desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of instructors who didn't teach any courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from instructor where id not in ( select id from teaches )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of instructors who didn't teach? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from instructor where id not in ( select id from teaches )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of instructors who didn't teach any courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select id from instructor except select id from teaches" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of instructors who didnt' teach? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select id from instructor except select id from teaches" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of instructors who didn't each any courses in any Spring semester. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name from instructor where id not in ( select id from teaches where semester = 'Spring' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of instructors who didn't teach courses in the Spring? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name from instructor where id not in ( select id from teaches where semester = 'Spring' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the department which has the highest average salary of professors. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select dept_name from instructor group by dept_name order by avg ( salary ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which department has the highest average instructor salary? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select dept_name from instructor group by dept_name order by avg ( salary ) desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number and averaged salary of all instructors who are in the department with the highest budget. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect avg ( _ ) , count ( _ ) from _ order by _ desc limit _ | select avg ( instructor.salary ) , count ( * ) from instructor join department on instructor.dept_name = department.dept_name order by department.budget desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many instructors are in the department with the highest budget, and what is their average salary? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect avg ( _ ) , count ( _ ) from _ order by _ desc limit _ | select avg ( instructor.salary ) , count ( * ) from instructor join department on instructor.dept_name = department.dept_name order by department.budget desc limit 1" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select course.title , course.credits from classroom join section on classroom.building = section.building and classroom.room_number = section.room_number join course on section.course_id = course.course_id where classroom.capacity = ( select max ( capacity ) from classroom )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the title and credits for the course that is taught in the classroom with the greatest capacity. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select course.title , course.credits from classroom join section on classroom.building = section.building and classroom.room_number = section.room_number join course on section.course_id = course.course_id where classroom.capacity = ( select max ( capacity ) from classroom )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of students who didn't take any course from Biology department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name from student where id not in ( select takes.id from takes join course on takes.course_id = course.course_id where course.dept_name = 'Biology' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of students who haven't taken any Biology courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name from student where id not in ( select takes.id from takes join course on takes.course_id = course.course_id where course.dept_name = 'Biology' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of students and total number of instructors for each department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) , count ( distinct _ ) , _ from _ group by _ | select count ( distinct student.id ) , count ( distinct instructor.id ) , instructor.dept_name from department join student on department.dept_name = student.dept_name join instructor on department.dept_name = instructor.dept_name group by instructor.dept_name" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students and instructors are in each department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) , count ( distinct _ ) , _ from _ group by _ | select count ( distinct student.id ) , count ( distinct instructor.id ) , instructor.dept_name from department join student on department.dept_name = student.dept_name join instructor on department.dept_name = instructor.dept_name group by instructor.dept_name" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of students who have taken the prerequisite course of the course with title International Finance. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select student.name from student join takes on student.id = takes.id where takes.course_id in ( select prereq.prereq_id from course join prereq on course.course_id = prereq.course_id where course.title = 'International Finance' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of students who have taken the prerequisite for the course International Finance? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select student.name from student join takes on student.id = takes.id where takes.course_id in ( select prereq.prereq_id from course join prereq on course.course_id = prereq.course_id where course.title = 'International Finance' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ where _ ) | select name , salary from instructor where salary < ( select avg ( salary ) from instructor where dept_name = 'Physics' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ where _ ) | select name , salary from instructor where salary < ( select avg ( salary ) from instructor where dept_name = 'Physics' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of students who took some course offered by Statistics department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select student.name from course join takes on course.course_id = takes.course_id join student on takes.id = student.id where course.dept_name = 'Statistics'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of students who have taken Statistics courses? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select student.name from course join takes on course.course_id = takes.course_id join student on takes.id = student.id where course.dept_name = 'Statistics'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select section.building , section.room_number , section.semester , section.year from course join section on course.course_id = section.course_id where course.dept_name = 'Psychology' order by course.title asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the building, room number, semester and year of courses in the Psychology department, sorted using course title? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select section.building , section.room_number , section.semester , section.year from course join section on course.course_id = section.course_id where course.dept_name = 'Psychology' order by course.title asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all instructors in computer science department | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select name from instructor where dept_name = 'Comp. Sci.'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all instructors in the Comp. Sci. department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select name from instructor where dept_name = 'Comp. Sci.'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all instructors in Comp. Sci. department with salary > 80000. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select name from instructor where dept_name = 'Comp. Sci.' and salary > 80000" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the instructors in the Comp. Sci. department who earn more than 80000? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select name from instructor where dept_name = 'Comp. Sci.' and salary > 80000" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all instructors who have taught some course and the course_id. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ | select name , course_id from instructor join teaches on instructor.id = teaches.id" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all instructors who have taught a course, as well as the corresponding course id? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ | select name , course_id from instructor join teaches on instructor.id = teaches.id" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all instructors in the Art department who have taught some course and the course_id. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select name , course_id from instructor join teaches on instructor.id = teaches.id where instructor.dept_name = 'Art'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of Art instructors who have taught a course, and the corresponding course id? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ | select name , course_id from instructor join teaches on instructor.id = teaches.id where instructor.dept_name = 'Art'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all instructors whose name includes the substring 'dar'. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from instructor where name like '%dar%'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all instructors with names that include \"dar\"? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from instructor where name like '%dar%'" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List in alphabetic order the names of all distinct instructors. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from instructor order by name asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct names of the instructors, ordered by name. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from instructor order by name asc" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find courses that ran in Fall 2009 or in Spring 2010. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select course_id from section where semester = 'Fall' and year = 2009 union select course_id from section where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids for courses in the Fall of 2009 or the Spring of 2010? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select course_id from section where semester = 'Fall' and year = 2009 union select course_id from section where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find courses that ran in Fall 2009 and in Spring 2010. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select course_id from section where semester = 'Fall' and year = 2009 intersect select course_id from section where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select course_id from section where semester = 'Fall' and year = 2009 intersect select course_id from section where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find courses that ran in Fall 2009 but not in Spring 2010. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select course_id from section where semester = 'Fall' and year = 2009 except select course_id from section where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of courses offered in Fall of 2009 but not in Spring of 2010? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select course_id from section where semester = 'Fall' and year = 2009 except select course_id from section where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the salaries of all distinct instructors that are less than the largest salary. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select max ( _ ) from _ ) | select distinct salary from instructor where salary < ( select max ( salary ) from instructor )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct salaries of all instructors who earned less than the maximum salary? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select max ( _ ) from _ ) | select distinct salary from instructor where salary < ( select max ( salary ) from instructor )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of instructors who teach a course in the Spring 2010 semester. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct id ) from teaches where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many instructors teach a course in the Spring of 2010? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct id ) from teaches where semester = 'Spring' and year = 2010" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and average salaries of all departments whose average salary is greater than 42000. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ having avg ( _ ) > _ | select dept_name , avg ( salary ) from instructor group by dept_name having avg ( salary ) > 42000" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and average salaries for departments with average salary higher than 42000? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ having avg ( _ ) > _ | select dept_name , avg ( salary ) from instructor group by dept_name having avg ( salary ) > 42000" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select min ( _ ) from _ where _ ) | select name from instructor where salary > ( select min ( salary ) from instructor where dept_name = 'Biology' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of instructors who earn more than at least one instructor from the Biology department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select min ( _ ) from _ where _ ) | select name from instructor where salary > ( select min ( salary ) from instructor where dept_name = 'Biology' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department. | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select name from instructor where salary > ( select max ( salary ) from instructor where dept_name = 'Biology' )" }, { "db_id": "college_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all instructors with a higher salary than any of the instructors in the Biology department? | classroom : building , room_number , capacity | department : dept_name , building , budget | course : course_id , title , dept_name , credits | instructor : id , name , dept_name , salary | section : course_id , sec_id , semester , year , building , room_number , time_slot_id | teaches : id , course_id , sec_id , semester , year | student : id , name , dept_name , tot_cred | takes : id , course_id , sec_id , semester , year , grade | advisor : s_id , i_id | time_slot : time_slot_id , day , start_hr , start_min , end_hr , end_min | prereq : course_id , prereq_id | course.dept_name = department.dept_name | instructor.dept_name = department.dept_name | section.building = classroom.building | section.room_number = classroom.room_number | section.course_id = course.course_id | teaches.id = instructor.id | teaches.course_id = section.course_id | teaches.sec_id = section.sec_id | teaches.semester = section.semester | teaches.year = section.year | student.dept_name = department.dept_name | takes.id = student.id | takes.course_id = section.course_id | takes.sec_id = section.sec_id | takes.semester = section.semester | takes.year = section.year | advisor.s_id = student.id | advisor.i_id = instructor.id | prereq.prereq_id = course.course_id | prereq.course_id = course.course_id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select name from instructor where salary > ( select max ( salary ) from instructor where dept_name = 'Biology' )" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many debates are there? | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from debate" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the venues of debates in ascending order of the number of audience. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select venue from debate order by num_of_audience asc" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the date and venue of each debate? | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ | select date , venue from debate" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the dates of debates with number of audience bigger than 150 | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ where _ | select date from debate where num_of_audience > 150" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of people aged either 35 or 36. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ where _ | select name from people where age = 35 or age = 36" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the party of the youngest people? | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select party from people order by age asc limit 1" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different parties of people along with the number of people in each party. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party , count ( * ) from people group by party" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the party that has the most people. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select party from people group by party order by count ( * ) desc limit 1" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct venues of debates | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct venue from debate" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of people, and dates and venues of debates they are on the affirmative side. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ | select people.name , debate.date , debate.venue from debate_people join debate on debate_people.debate_id = debate.debate_id join people on debate_people.affirmative = people.people_id" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select people.name , debate.date , debate.venue from debate_people join debate on debate_people.debate_id = debate.debate_id join people on debate_people.negative = people.people_id order by people.name asc" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of people that are on affirmative side of debates with number of audience bigger than 200. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from debate_people join debate on debate_people.debate_id = debate.debate_id join people on debate_people.affirmative = people.people_id where debate.num_of_audience > 200" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of people and the number of times they have been on the affirmative side of debates. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select people.name , count ( * ) from debate_people join people on debate_people.affirmative = people.people_id group by people.name" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of people who have been on the negative side of debates at least twice. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select people.name from debate_people join people on debate_people.negative = people.people_id group by people.name having count ( * ) >= 2" }, { "db_id": "debate", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of people that have not been on the affirmative side of debates. | people : people_id , district , name , party , age | debate : debate_id , date , venue , num_of_audience | debate_people : debate_id , affirmative , negative , if_affirmative_win | debate_people.negative = people.people_id | debate_people.affirmative = people.people_id | debate_people.debate_id = debate.debate_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select affirmative from debate_people )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all the customers in alphabetical order. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select customer_details from customers order by customer_details asc" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the customer names in alphabetical order. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select customer_details from customers order by customer_details asc" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the policy type codes associated with the customer \"Dayana Robel\" | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ | select policy_type_code from policies join customers on policies.customer_id = customers.customer_id where customers.customer_details = 'Dayana Robel'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the type codes of the policies used by the customer \"Dayana Robel\"? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ | select policy_type_code from policies join customers on policies.customer_id = customers.customer_id where customers.customer_details = 'Dayana Robel'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which type of policy is most frequently used? Give me the policy type code. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select policy_type_code from policies group by policy_type_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the type code of the most frequently used policy. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select policy_type_code from policies group by policy_type_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the policy types that are used by more than 2 customers. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select policy_type_code from policies group by policy_type_code having count ( * ) > 2" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which types of policy are chosen by more than 2 customers? Give me the policy type codes. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select policy_type_code from policies group by policy_type_code having count ( * ) > 2" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total and average amount paid in claim headers. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect sum ( _ ) , avg ( _ ) from _ | select sum ( amount_piad ) , avg ( amount_piad ) from claim_headers" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total amount and average amount paid in claim headers? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect sum ( _ ) , avg ( _ ) from _ | select sum ( amount_piad ) , avg ( amount_piad ) from claim_headers" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total amount claimed in the most recently created document. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ = ( select _ from _ order by _ asc limit _ ) | select sum ( claim_headers.amount_claimed ) from claim_headers join claims_documents on claim_headers.claim_header_id = claims_documents.claim_id where claims_documents.created_date = ( select created_date from claims_documents order by created_date asc limit 1 )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How much amount in total were claimed in the most recently created document? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ = ( select _ from _ order by _ asc limit _ ) | select sum ( claim_headers.amount_claimed ) from claim_headers join claims_documents on claim_headers.claim_header_id = claims_documents.claim_id where claims_documents.created_date = ( select created_date from claims_documents order by created_date asc limit 1 )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer who has made the largest amount of claim in a single claim? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_claimed = ( select max ( amount_claimed ) from claim_headers )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer made the largest amount of claim in a single claim? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_claimed = ( select max ( amount_claimed ) from claim_headers )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer who has made the minimum amount of payment in one claim? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_piad = ( select min ( amount_piad ) from claim_headers )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer made the smallest amount of claim in one claim? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ ) | select customers.customer_details from claim_headers join policies on claim_headers.policy_id = policies.policy_id join customers on policies.customer_id = customers.customer_id where claim_headers.amount_piad = ( select min ( amount_piad ) from claim_headers )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who have no policies associated. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_details from customers except select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who do not have any policies? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_details from customers except select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many claim processing stages are there in total? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from claims_processing_stages" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct stages in claim processing. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from claims_processing_stages" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the claim processing stage that most of the claims are on? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select claims_processing_stages.claim_status_name from claims_processing join claims_processing_stages on claims_processing.claim_stage_id = claims_processing_stages.claim_stage_id group by claims_processing.claim_stage_id order by count ( * ) desc limit 1" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which claim processing stage has the most claims? Show the claim status name. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select claims_processing_stages.claim_status_name from claims_processing join claims_processing_stages on claims_processing.claim_stage_id = claims_processing_stages.claim_stage_id group by claims_processing.claim_stage_id order by count ( * ) desc limit 1" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers whose name contains \"Diana\". | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_details from customers where customer_details like '%Diana%'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have the substring \"Diana\" in their names? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_details from customers where customer_details like '%Diana%'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the customers who have an deputy policy. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have an insurance policy with the type code \"Deputy\"? Give me the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who either have an deputy policy or uniformed policy. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy' or policies.policy_type_code = 'Uniform'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have an insurance policy with the type code \"Deputy\" or \"Uniform\"? Return the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.policy_type_code = 'Deputy' or policies.policy_type_code = 'Uniform'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all the customers and staff members. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select customer_details from customers union select staff_details from staff" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the customers and staff members? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select customer_details from customers union select staff_details from staff" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of records of each policy type and its type code. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select policy_type_code , count ( * ) from policies group by policy_type_code" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each policy type, return its type code and its count in the record. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select policy_type_code , count ( * ) from policies group by policy_type_code" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the customer that has been involved in the most policies. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id group by customers.customer_details order by count ( * ) desc limit 1" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer have the most policies? Give me the customer details. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id group by customers.customer_details order by count ( * ) desc limit 1" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the claim status \"Open\"? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ | select claim_status_description from claims_processing_stages where claim_status_name = 'Open'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the description of the claim status \"Open\". | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ | select claim_status_description from claims_processing_stages where claim_status_name = 'Open'" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct claim outcome codes are there? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct claim_outcome_code ) from claims_processing" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct claim outcome codes. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct claim_outcome_code ) from claims_processing" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer is associated with the latest policy? | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.start_date = ( select max ( start_date ) from policies )" }, { "db_id": "insurance_and_eClaims", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the customer who started a policy most recently. | customers : customer_id , customer_details | staff : staff_id , staff_details | policies : policy_id , customer_id , policy_type_code , start_date , end_date | claim_headers : claim_header_id , claim_status_code , claim_type_code , policy_id , date_of_claim , date_of_settlement , amount_claimed , amount_piad | claims_documents : claim_id , document_type_code , created_by_staff_id , created_date | claims_processing_stages : claim_stage_id , next_claim_stage_id , claim_status_name , claim_status_description | claims_processing : claim_processing_id , claim_id , claim_outcome_code , claim_stage_id , staff_id | policies.customer_id = customers.customer_id | claim_headers.policy_id = policies.policy_id | claims_documents.created_by_staff_id = staff.staff_id | claims_documents.claim_id = claim_headers.claim_header_id | claims_processing.staff_id = staff.staff_id | claims_processing.claim_id = claim_headers.claim_header_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_details from policies join customers on policies.customer_id = customers.customer_id where policies.start_date = ( select max ( start_date ) from policies )" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of accounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts are there? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers have opened an account? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct customer_id ) from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers who have an account. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct customer_id ) from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id, the date of account opened, the account name, and other account detail for all accounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select account_id , date_account_opened , account_name , other_account_details from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, date opened, name, and other details for all accounts? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select account_id , date_account_opened , account_name , other_account_details from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select accounts.account_id , accounts.date_account_opened , accounts.account_name , accounts.other_account_details from accounts join customers on accounts.customer_id = customers.customer_id where customers.customer_first_name = 'Meaghan'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name \"Meaghan\"? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select accounts.account_id , accounts.date_account_opened , accounts.account_name , accounts.other_account_details from accounts join customers on accounts.customer_id = customers.customer_id where customers.customer_first_name = 'Meaghan'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select accounts.account_name , accounts.other_account_details from accounts join customers on accounts.customer_id = customers.customer_id where customers.customer_first_name = 'Meaghan' and customers.customer_last_name = 'Keeling'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and other details for accounts corresponding to the customer named Meaghan Keeling? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select accounts.account_name , accounts.other_account_details from accounts join customers on accounts.customer_id = customers.customer_id where customers.customer_first_name = 'Meaghan' and customers.customer_last_name = 'Keeling'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the first name and last name for the customer with account name 900. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_first_name , customers.customer_last_name from accounts join customers on accounts.customer_id = customers.customer_id where accounts.account_name = '900'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of customers with the account name 900? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_first_name , customers.customer_last_name from accounts join customers on accounts.customer_id = customers.customer_id where accounts.account_name = '900'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers don't have an account? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from accounts )" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers who do not have an account. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from accounts )" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the unique first names, last names, and phone numbers for all customers with any account. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customers.customer_first_name , customers.customer_last_name , customers.phone_number from customers join accounts on customers.customer_id = accounts.customer_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct first names, last names, and phone numbers for customers with accounts? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customers.customer_first_name , customers.customer_last_name , customers.phone_number from customers join accounts on customers.customer_id = accounts.customer_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show customer ids who don't have an account. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_id from customers except select customer_id from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the customer ids for customers who do not have an account? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_id from customers except select customer_id from accounts" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts does each customer have? List the number and customer id. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , customer_id from accounts group by customer_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of accounts corresponding to each customer id. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , customer_id from accounts group by customer_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the customer id, first and last name with most number of accounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select accounts.customer_id , customers.customer_first_name , customers.customer_last_name from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the id and full name of the customer with the most accounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select accounts.customer_id , customers.customer_first_name , customers.customer_last_name from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show id, first name and last name for all customers and the number of accounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select accounts.customer_id , customers.customer_first_name , customers.customer_last_name , count ( * ) from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the the full names and ids for all customers, and how many accounts does each have? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select accounts.customer_id , customers.customer_first_name , customers.customer_last_name , count ( * ) from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show first name and id for all customers with at least 2 accounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select customers.customer_first_name , accounts.customer_id from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id having count ( * ) >= 2" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and ids for customers who have two or more accounts? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select customers.customer_first_name , accounts.customer_id from accounts join customers on accounts.customer_id = customers.customer_id group by accounts.customer_id having count ( * ) >= 2" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of customers. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of customers for each gender. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select gender , count ( * ) from customers group by gender" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are there of each gender? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select gender , count ( * ) from customers group by gender" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many transactions do we have? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from financial_transactions" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of transactions. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from financial_transactions" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many transaction does each account have? Show the number and account id. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ | select count ( * ) , account_id from financial_transactions" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of financial transactions that correspond to each account id. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ | select count ( * ) , account_id from financial_transactions" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many transaction does account with name 337 have? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id where accounts.account_name = '337'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of financial transactions that the account with the name 337 has. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id where accounts.account_name = '337'" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average, minimum, maximum, and total transaction amount? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , max ( _ ) , sum ( _ ) from _ | select avg ( transaction_amount ) , min ( transaction_amount ) , max ( transaction_amount ) , sum ( transaction_amount ) from financial_transactions" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average, minimum, maximum, and total transaction amounts. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , max ( _ ) , sum ( _ ) from _ | select avg ( transaction_amount ) , min ( transaction_amount ) , max ( transaction_amount ) , sum ( transaction_amount ) from financial_transactions" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all transactions whose amounts are greater than the average. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select transaction_id from financial_transactions where transaction_amount > ( select avg ( transaction_amount ) from financial_transactions )" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids for transactions that have an amount greater than the average amount of a transaction? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select transaction_id from financial_transactions where transaction_amount > ( select avg ( transaction_amount ) from financial_transactions )" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the transaction types and the total amount of transactions. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select transaction_type , sum ( transaction_amount ) from financial_transactions group by transaction_type" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are total transaction amounts for each transaction type? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select transaction_type , sum ( transaction_amount ) from financial_transactions group by transaction_type" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the account name, id and the number of transactions for each account. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select accounts.account_name , financial_transactions.account_id , count ( * ) from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id group by financial_transactions.account_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names and ids of each account, as well as the number of transactions. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select accounts.account_name , financial_transactions.account_id , count ( * ) from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id group by financial_transactions.account_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the account id with most number of transactions. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select account_id from financial_transactions group by account_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the account with the most transactions? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select account_id from financial_transactions group by account_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the account id and name with at least 4 transactions. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select financial_transactions.account_id , accounts.account_name from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id group by financial_transactions.account_id having count ( * ) >= 4" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of accounts with 4 or more transactions? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select financial_transactions.account_id , accounts.account_name from financial_transactions join accounts on financial_transactions.account_id = accounts.account_id group by financial_transactions.account_id having count ( * ) >= 4" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all product sizes. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct product_size from products" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different product sizes? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct product_size from products" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all product colors. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct product_color from products" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different product colors? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct product_color from products" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the invoice number and the number of transactions for each invoice. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select invoice_number , count ( * ) from financial_transactions group by invoice_number" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many transactions correspond to each invoice number? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select invoice_number , count ( * ) from financial_transactions group by invoice_number" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the invoice number and invoice date for the invoice with most number of transactions? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select invoices.invoice_number , invoices.invoice_date from financial_transactions join invoices on financial_transactions.invoice_number = invoices.invoice_number group by financial_transactions.invoice_number order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select invoices.invoice_number , invoices.invoice_date from financial_transactions join invoices on financial_transactions.invoice_number = invoices.invoice_number group by financial_transactions.invoice_number order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many invoices do we have? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from invoices" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of invoices. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from invoices" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show invoice dates and order id and details for all invoices. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select invoices.invoice_date , invoices.order_id , orders.order_details from invoices join orders on invoices.order_id = orders.order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the invoice dates, order ids, and order details for all invoices? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select invoices.invoice_date , invoices.order_id , orders.order_details from invoices join orders on invoices.order_id = orders.order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the order ids and the number of invoices for each order. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select order_id , count ( * ) from invoices group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many invoices correspond to each order id? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select order_id , count ( * ) from invoices group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the order id and order details for the order more than two invoices. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select orders.order_id , orders.order_details from invoices join orders on invoices.order_id = orders.order_id group by orders.order_id having count ( * ) > 2" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the order ids and details for orderes with two or more invoices. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select orders.order_id , orders.order_details from invoices join orders on invoices.order_id = orders.order_id group by orders.order_id having count ( * ) > 2" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the customer last name, id and phone number with most number of orders? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_last_name , orders.customer_id , customers.phone_number from orders join customers on orders.customer_id = customers.customer_id group by orders.customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the last name, id and phone number of the customer who has made the greatest number of orders. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_last_name , orders.customer_id , customers.phone_number from orders join customers on orders.customer_id = customers.customer_id group by orders.customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all product names without an order. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select product_name from products except select products.product_name from products join order_items on products.product_id = order_items.product_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of products that have never been ordered? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select product_name from products except select products.product_name from products join order_items on products.product_id = order_items.product_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all product names and the total quantity ordered for each product name. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select products.product_name , sum ( order_items.product_quantity ) from order_items join products on order_items.product_id = products.product_id group by products.product_name" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different product names, and what is the sum of quantity ordered for each product? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select products.product_name , sum ( order_items.product_quantity ) from order_items join products on order_items.product_id = products.product_id group by products.product_name" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the order ids and the number of items in each order. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select order_id , count ( * ) from order_items group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many order items correspond to each order id? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select order_id , count ( * ) from order_items group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the product ids and the number of unique orders containing each product. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select product_id , count ( distinct order_id ) from order_items group by product_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct order ids correspond to each product? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select product_id , count ( distinct order_id ) from order_items group by product_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all product names and the number of customers having an order on each product. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from order_items join products on order_items.product_id = products.product_id join orders on orders.order_id = order_items.order_id group by products.product_name" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are teh names of the different products, as well as the number of customers who have ordered each product. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from order_items join products on order_items.product_id = products.product_id join orders on orders.order_id = order_items.order_id group by products.product_name" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show order ids and the number of products in each order. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select order_id , count ( distinct product_id ) from order_items group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different products correspond to each order id? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select order_id , count ( distinct product_id ) from order_items group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show order ids and the total quantity in each order. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select order_id , sum ( product_quantity ) from order_items group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the order ids for all orders, as well as the total product quantity in each. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select order_id , sum ( product_quantity ) from order_items group by order_id" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products were not included in any order? | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from products where product_id not in ( select product_id from order_items )" }, { "db_id": "customers_and_invoices", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of products that were never ordered. | customers : customer_id , customer_first_name , customer_middle_initial , customer_last_name , gender , email_address , login_name , login_password , phone_number , town_city , state_county_province , country | orders : order_id , customer_id , date_order_placed , order_details | invoices : invoice_number , order_id , invoice_date | accounts : account_id , customer_id , date_account_opened , account_name , other_account_details | product_categories : production_type_code , product_type_description , vat_rating | products : product_id , parent_product_id , production_type_code , unit_price , product_name , product_color , product_size | financial_transactions : transaction_id , account_id , invoice_number , transaction_type , transaction_date , transaction_amount , transaction_comment , other_transaction_details | order_items : order_item_id , order_id , product_id , product_quantity , other_order_item_details | invoice_line_items : order_item_id , invoice_number , product_id , product_title , product_quantity , product_price , derived_product_cost , derived_vat_payable , derived_total_cost | orders.customer_id = customers.customer_id | invoices.order_id = orders.order_id | accounts.customer_id = customers.customer_id | products.production_type_code = product_categories.production_type_code | financial_transactions.account_id = accounts.account_id | financial_transactions.invoice_number = invoices.invoice_number | order_items.order_id = orders.order_id | order_items.product_id = products.product_id | invoice_line_items.product_id = products.product_id | invoice_line_items.invoice_number = invoices.invoice_number | invoice_line_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from products where product_id not in ( select product_id from order_items )" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many churches opened before 1850 are there? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from church where open_date < 1850" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, open date, and organizer for all churches. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ | select name , open_date , organized_by from church" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all church names in descending order of opening date. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from church order by open_date desc" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the opening year in whcih at least two churches opened. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select open_date from church group by open_date having count ( * ) >= 2" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the organizer and name for churches that opened between 1830 and 1840. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select organized_by , name from church where open_date between 1830 and 1840" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all opening years and the number of churches that opened in that year. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select open_date , count ( * ) from church group by open_date" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and opening year for three churches that opened most recently. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , open_date from church order by open_date desc limit 3" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many female people are older than 30 in our record? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from people where is_male = 'F' and age > 30" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the country where people older than 30 and younger than 25 are from. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country from people where age < 25 intersect select country from people where age > 30" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the minimum, maximum, and average age for all people. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( age ) , max ( age ) , avg ( age ) from people" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and country for all people whose age is smaller than the average. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select name , country from people where age < ( select avg ( age ) from people )" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the pair of male and female names in all weddings after year 2014 | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name , people.name from wedding join people on wedding.male_id = people.people_id join people on wedding.female_id = people.people_id where wedding.year > 2014" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and age for all male people who don't have a wedding. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name , age from people where is_male = 'T' and people_id not in ( select male_id from wedding )" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all church names except for those that had a wedding in year 2015. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from church except select church.name from church join wedding on church.church_id = wedding.church_id where wedding.year = 2015" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all church names that have hosted least two weddings. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select church.name from church join wedding on church.church_id = wedding.church_id group by church.church_id having count ( * ) >= 2" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names for all females from Canada having a wedding in year 2016. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from wedding join people on wedding.female_id = people.people_id where wedding.year = 2016 and people.is_male = 'F' and people.country = 'Canada'" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many weddings are there in year 2016? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from wedding where year = 2016" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the church names for the weddings of all people older than 30. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ from _ where _ | select church.name from wedding join people on wedding.male_id = people.people_id join people on wedding.female_id = people.people_id join church on church.church_id = wedding.church_id where people.age > 30 or people.age > 30" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all countries and the number of people from each country. | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country , count ( * ) from people group by country" }, { "db_id": "wedding", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many churches have a wedding in year 2016? | people : people_id , name , country , is_male , age | church : church_id , name , organized_by , open_date , continuation_of | wedding : church_id , male_id , female_id , year | wedding.female_id = people.people_id | wedding.male_id = people.people_id | wedding.church_id = church.church_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct church_id ) from wedding where year = 2016" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many artists do we have? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from artist" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of artists. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from artist" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all artist name, age, and country ordered by the yeared they joined. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , age , country from artist order by year_join asc" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, ages, and countries of artists, sorted by the year they joined? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , age , country from artist order by year_join asc" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all distinct country for artists? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct country from artist" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the different countries for artists. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct country from artist" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all artist names and the year joined who are not from United States. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ | select name , year_join from artist where country != 'United States'" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and year of joining for artists that do not have the country \"United States\"? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ | select name , year_join from artist where country != 'United States'" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many artists are above age 46 and joined after 1990? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from artist where age > 46 and year_join > 1990" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of artists who are older than 46 and joined after 1990. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from artist where age > 46 and year_join > 1990" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and minimum age of all artists from United States. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) from _ where _ | select avg ( age ) , min ( age ) from artist where country = 'United States'" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average and minimum ages across artists from the United States. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) from _ where _ | select avg ( age ) , min ( age ) from artist where country = 'United States'" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the artist who joined latest? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from artist order by year_join desc limit 1" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the artist who has the latest join year. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from artist order by year_join desc limit 1" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many exhibition are there in year 2005 or after? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from exhibition where year >= 2005" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of exhibitions that happened in or after 2005. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from exhibition where year >= 2005" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show theme and year for all exhibitions with ticket prices lower than 15. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ | select theme , year from exhibition where ticket_price < 15" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the theme and year for all exhibitions that have a ticket price under 15? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ | select theme , year from exhibition where ticket_price < 15" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all artist names and the number of exhibitions for each artist. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select artist.name , count ( * ) from exhibition join artist on exhibition.artist_id = artist.artist_id group by exhibition.artist_id" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many exhibitions has each artist had? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select artist.name , count ( * ) from exhibition join artist on exhibition.artist_id = artist.artist_id group by exhibition.artist_id" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and country for the artist with most number of exhibitions? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select artist.name , artist.country from exhibition join artist on exhibition.artist_id = artist.artist_id group by exhibition.artist_id order by count ( * ) desc limit 1" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name and country corresponding to the artist who has had the most exhibitions. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select artist.name , artist.country from exhibition join artist on exhibition.artist_id = artist.artist_id group by exhibition.artist_id order by count ( * ) desc limit 1" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for artists without any exhibition. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from artist where artist_id not in ( select artist_id from exhibition )" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of artists that have not had any exhibitions? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from artist where artist_id not in ( select artist_id from exhibition )" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the theme and artist name for the exhibition with a ticket price higher than the average? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select exhibition.theme , artist.name from exhibition join artist on exhibition.artist_id = artist.artist_id where exhibition.ticket_price > ( select avg ( ticket_price ) from exhibition )" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of artists and the themes of their exhibitions that had a ticket price higher than average. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select exhibition.theme , artist.name from exhibition join artist on exhibition.artist_id = artist.artist_id where exhibition.ticket_price > ( select avg ( ticket_price ) from exhibition )" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , max ( _ ) from _ where _ | select avg ( ticket_price ) , min ( ticket_price ) , max ( ticket_price ) from exhibition where year < 2009" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , max ( _ ) from _ where _ | select avg ( ticket_price ) , min ( ticket_price ) , max ( ticket_price ) from exhibition where year < 2009" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show theme and year for all exhibitions in an descending order of ticket price. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select theme , year from exhibition order by ticket_price desc" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the themes and years for exhibitions, sorted by ticket price descending? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select theme , year from exhibition order by ticket_price desc" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the theme, date, and attendance for the exhibition in year 2004? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ | select exhibition.theme , exhibition_record.date , exhibition_record.attendance from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition.year = 2004" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the themes, dates, and attendance for exhibitions that happened in 2004. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ | select exhibition.theme , exhibition_record.date , exhibition_record.attendance from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition.year = 2004" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all artist names who didn't have an exhibition in 2004. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from artist except select artist.name from exhibition join artist on exhibition.artist_id = artist.artist_id where exhibition.year = 2004" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of artists who did not have an exhibition in 2004? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from artist except select artist.name from exhibition join artist on exhibition.artist_id = artist.artist_id where exhibition.year = 2004" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the theme for exhibitions with both records of an attendance below 100 and above 500. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance < 100 intersect select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 500" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance < 100 intersect select exhibition.theme from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 500" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many exhibitions have a attendance more than 100 or have a ticket price below 10? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 100 or exhibition.ticket_price < 10" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id where exhibition_record.attendance > 100 or exhibition.ticket_price < 10" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all artist names with an average exhibition attendance over 200. | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ | select artist.name from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id join artist on artist.artist_id = exhibition.artist_id group by artist.artist_id having avg ( exhibition_record.attendance ) > 200" }, { "db_id": "theme_gallery", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of artist whose exhibitions draw over 200 attendees on average? | artist : artist_id , name , country , year_join , age | exhibition : exhibition_id , year , theme , artist_id , ticket_price | exhibition_record : exhibition_id , date , attendance | exhibition.artist_id = artist.artist_id | exhibition_record.exhibition_id = exhibition.exhibition_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ | select artist.name from exhibition_record join exhibition on exhibition_record.exhibition_id = exhibition.exhibition_id join artist on artist.artist_id = exhibition.artist_id group by artist.artist_id having avg ( exhibition_record.attendance ) > 200" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the item whose title is \"orange\". | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ | select i_id from item where title = 'orange'" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all information in the item table. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ | select * from item" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of reviews. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from review" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many users are there? | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from useracct" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average and maximum rating of all reviews. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ | select avg ( rating ) , max ( rating ) from review" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the highest rank of all reviews. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect min ( _ ) from _ | select min ( rank ) from review" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different users wrote some reviews? | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct u_id ) from review" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different items were reviewed by some users? | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct i_id ) from review" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of items that did not receive any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from item where i_id not in ( select i_id from review )" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of users who did not leave any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from useracct where u_id not in ( select u_id from review )" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of goods that receive a rating of 10. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ | select item.title from item join review on item.i_id = review.i_id where review.rating = 10" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of items whose rating is higher than the average review rating of all items. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select item.title from item join review on item.i_id = review.i_id where review.rating > ( select avg ( rating ) from review )" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of items that received any rating below 5. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ | select item.title from item join review on item.i_id = review.i_id where review.rating < 5" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of items that received both a rating higher than 8 and a rating below 5. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select item.title from item join review on item.i_id = review.i_id where review.rating > 8 intersect select item.title from item join review on item.i_id = review.i_id where review.rating < 5" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of items whose rank is higher than 3 and whose average rating is above 5. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ group by _ having avg ( _ ) > _ | select item.title from item join review on item.i_id = review.i_id where review.rank > 3 intersect select item.title from item join review on item.i_id = review.i_id group by review.i_id having avg ( review.rating ) > 5" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the item with the lowest average rating. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) asc limit _ | select item.title from item join review on item.i_id = review.i_id group by review.i_id order by avg ( review.rating ) asc limit 1" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the titles of all items in alphabetic order . | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select title from item order by title asc" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the user who gives the most reviews. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select useracct.name from useracct join review on useracct.u_id = review.u_id group by review.u_id order by count ( * ) desc limit 1" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and id of the item with the highest average rating. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select item.title , item.i_id from item join review on item.i_id = review.i_id group by review.i_id order by avg ( review.rating ) desc limit 1" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and id of the good with the highest average rank. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select item.title , item.i_id from item join review on item.i_id = review.i_id group by review.i_id order by avg ( review.rank ) desc limit 1" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each user, return the name and the average rating of reviews given by them. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select useracct.name , avg ( review.rating ) from useracct join review on useracct.u_id = review.u_id group by review.u_id" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each user, find their name and the number of reviews written by them. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select useracct.name , count ( * ) from useracct join review on useracct.u_id = review.u_id group by review.u_id" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the user who gave the highest rating. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select useracct.name from useracct join review on useracct.u_id = review.u_id order by review.rating desc limit 1" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the source user with the highest average trust score. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select useracct.name from useracct join trust on useracct.u_id = trust.source_u_id group by trust.source_u_id order by avg ( trust ) desc limit 1" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find each target user's name and average trust score. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select useracct.name , avg ( trust ) from useracct join trust on useracct.u_id = trust.target_u_id group by trust.target_u_id" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the target user with the lowest trust score. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select useracct.name from useracct join trust on useracct.u_id = trust.target_u_id order by trust asc limit 1" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the items that did not receive any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from item where i_id not in ( select i_id from review )" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of users who did not leave any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from useracct where u_id not in ( select u_id from review )" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of users who did not write any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from useracct where u_id not in ( select u_id from review )" }, { "db_id": "epinions_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of items without any review. | item : i_id , title | review : a_id , u_id , i_id , rating , rank | useracct : u_id , name | trust : source_u_id , target_u_id , trust | review.i_id = item.i_id | review.u_id = useracct.u_id | trust.target_u_id = useracct.u_id | trust.source_u_id = useracct.u_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from item where i_id not in ( select i_id from review )" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players are there? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from player" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of players in ascending order of votes. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select player_name from player order by votes asc" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the gender and occupation of players? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ | select gender , occupation from player" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and residence for players whose occupation is not \"Researcher\". | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ where _ | select player_name , residence from player where occupation != 'Researcher'" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of sponsors of players whose residence is either \"Brandon\" or \"Birtle\". | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ where _ | select sponsor_name from player where residence = 'Brandon' or residence = 'Birtle'" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the player with the largest number of votes? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select player_name from player order by votes desc limit 1" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different occupations along with the number of players in each occupation. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select occupation , count ( * ) from player group by occupation" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the most common occupation of players. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select occupation from player group by occupation order by count ( * ) desc limit 1" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the residences that have at least two players. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select residence from player group by residence having count ( * ) >= 2" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of players and names of their coaches. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ | select player.player_name , coach.coach_name from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of players coached by the rank 1 coach. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ where _ | select player.player_name from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id where coach.rank = 1" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and genders of players with a coach starting after 2011. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ where _ | select player.player_name , player.gender from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id where player_coach.starting_year > 2011" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of players and names of their coaches in descending order of the votes of players. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select player.player_name , coach.coach_name from player_coach join coach on player_coach.coach_id = coach.coach_id join player on player_coach.player_id = player.player_id order by player.votes desc" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of players that do not have coaches. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select player_name from player where player_id not in ( select player_id from player_coach )" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the residences that have both a player of gender \"M\" and a player of gender \"F\". | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select residence from player where gender = 'M' intersect select residence from player where gender = 'F'" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many coaches does each club has? List the club id, name and the number of coaches. | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select club.club_id , club.club_name , count ( * ) from club join coach on club.club_id = coach.club_id group by club.club_id" }, { "db_id": "riding_club", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many gold medals has the club with the most coaches won? | player : player_id , sponsor_name , player_name , gender , residence , occupation , votes , rank | club : club_id , club_name , region , start_year | coach : coach_id , coach_name , gender , club_id , rank | player_coach : player_id , coach_id , starting_year | match_result : rank , club_id , gold , big_silver , small_silver , bronze , points | coach.club_id = club.club_id | player_coach.coach_id = coach.coach_id | player_coach.player_id = player.player_id | match_result.club_id = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select match_result.club_id , match_result.gold from match_result join coach on match_result.club_id = coach.club_id group by match_result.club_id order by count ( * ) desc limit 1" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many gymnasts are there? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from gymnast" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from gymnast" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the total points of gymnasts in descending order. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select total_points from gymnast order by total_points desc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total points for all gymnasts, ordered by total points descending? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select total_points from gymnast order by total_points desc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the total points of gymnasts in descending order of floor exercise points. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select total_points from gymnast order by floor_exercise_points desc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total points of gymnasts, ordered by their floor exercise points descending? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select total_points from gymnast order by floor_exercise_points desc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average horizontal bar points for all gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( horizontal_bar_points ) from gymnast" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average horizontal bar points across all gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( horizontal_bar_points ) from gymnast" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of people in ascending alphabetical order? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from people order by name asc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of people, ordered alphabetically. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from people order by name asc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of the gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of gymnasts whose hometown is not \"Santo Domingo\"? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id where people.hometown != 'Santo Domingo'" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of gymnasts who did not grow up in Santo Domingo. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id where people.hometown != 'Santo Domingo'" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the age of the tallest person? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select age from people order by height desc limit 1" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the age of the person with the greatest height. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select age from people order by height desc limit 1" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of the top 5 oldest people. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from people order by age desc limit 5" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the five oldest people? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from people order by age desc limit 5" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total point count of the youngest gymnast? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select gymnast.total_points from gymnast join people on gymnast.gymnast_id = people.people_id order by people.age asc limit 1" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the total points of the gymnast with the lowest age. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select gymnast.total_points from gymnast join people on gymnast.gymnast_id = people.people_id order by people.age asc limit 1" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age of all gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( people.age ) from gymnast join people on gymnast.gymnast_id = people.people_id" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average age across all gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( people.age ) from gymnast join people on gymnast.gymnast_id = people.people_id" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct hometowns of gymnasts with total points more than 57.5? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id where gymnast.total_points > 57.5" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the different hometowns of gymnasts that have a total point score of above 57.5. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id where gymnast.total_points > 57.5" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the hometowns of gymnasts and the corresponding number of gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select people.hometown , count ( * ) from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many gymnasts are from each hometown? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select people.hometown , count ( * ) from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common hometown of gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown order by count ( * ) desc limit 1" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the hometown that is most common among gymnasts. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown order by count ( * ) desc limit 1" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the hometowns that are shared by at least two gymnasts? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown having count ( * ) >= 2" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the hometowns from which two or more gymnasts are from. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id group by people.hometown having count ( * ) >= 2" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of gymnasts in ascending order by their heights. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id order by people.height asc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of gymnasts, ordered by their heights ascending? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select people.name from gymnast join people on gymnast.gymnast_id = people.people_id order by people.height asc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct hometowns that are not associated with any gymnast. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ | select distinct hometown from people except select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: From which hometowns did no gymnasts come from? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ | select distinct hometown from people except select distinct people.hometown from gymnast join people on gymnast.gymnast_id = people.people_id" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the hometowns shared by people older than 23 and younger than 20. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select hometown from people where age > 23 intersect select hometown from people where age < 20" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: From which hometowns did both people older than 23 and younger than 20 come from? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select hometown from people where age > 23 intersect select hometown from people where age < 20" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct hometowns did these people have? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct hometown ) from people" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different hometowns of these people. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct hometown ) from people" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ages of gymnasts in descending order of total points. | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select people.age from gymnast join people on gymnast.gymnast_id = people.people_id order by gymnast.total_points desc" }, { "db_id": "gymnast", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ages of the gymnasts, ordered descending by their total points? | gymnast : gymnast_id , floor_exercise_points , pommel_horse_points , rings_points , vault_points , parallel_bars_points , horizontal_bar_points , total_points | people : people_id , name , age , height , hometown | gymnast.gymnast_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select people.age from gymnast join people on gymnast.gymnast_id = people.people_id order by gymnast.total_points desc" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total savings balance of all accounts except the account with name 'Brown'. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( savings.balance ) from accounts join savings on accounts.custid = savings.custid where accounts.name != 'Brown'" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total balance of savings accounts not belonging to someone with the name Brown? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( savings.balance ) from accounts join savings on accounts.custid = savings.custid where accounts.name != 'Brown'" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts are there in total? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of accounts. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total checking balance in all accounts? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( balance ) from checking" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total balance across checking accounts. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( balance ) from checking" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( balance ) from checking" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average balance in checking accounts? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( balance ) from checking" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts have a savings balance above the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from savings where balance > ( select avg ( balance ) from savings )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of accounts with a savings balance that is higher than the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from savings where balance > ( select avg ( balance ) from savings )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and id of accounts whose checking balance is below the maximum checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ < ( select max ( _ ) from _ ) | select accounts.custid , accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select max ( balance ) from checking )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ < ( select max ( _ ) from _ ) | select accounts.custid , accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select max ( balance ) from checking )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the checking balance of the account whose owner's name contains the substring 'ee'? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ like _ | select checking.balance from accounts join checking on accounts.custid = checking.custid where accounts.name like '%ee%'" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the balance of the checking account belonging to an owner whose name contains 'ee'. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ like _ | select checking.balance from accounts join checking on accounts.custid = checking.custid where accounts.name like '%ee%'" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the checking balance and saving balance in the Brown's account. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ | select checking.balance , savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where accounts.name = 'Brown'" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the checking and savings balances in accounts belonging to Brown? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ | select checking.balance , savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where accounts.name = 'Brown'" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) intersect select _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from checking ) intersect select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance < ( select avg ( balance ) from savings )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) intersect select _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from checking ) intersect select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance < ( select avg ( balance ) from savings )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ > ( select avg ( _ ) from _ ) ) | select savings.balance from accounts join checking on accounts.custid = savings.custid where accounts.name in ( select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings ) )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ > ( select avg ( _ ) from _ ) ) | select savings.balance from accounts join checking on accounts.custid = savings.custid where accounts.name in ( select accounts.name from accounts join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings ) )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all customers' names in the alphabetical order. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from accounts order by name asc" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the customers in alphabetical order? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from accounts order by name asc" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of account that has the lowest total checking and saving balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ + _ asc limit _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance asc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name corresponding to the accoung with the lowest sum of checking and savings balances? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ + _ asc limit _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance asc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ + _ from _ where _ > ( select avg ( _ ) from _ ) | select accounts.name , checking.balance + savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ + _ from _ where _ > ( select avg ( _ ) from _ ) | select accounts.name , checking.balance + savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance > ( select avg ( balance ) from savings )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and checking balance of the account with the lowest savings balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select accounts.name , checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and balances of checking accounts belonging to the customer with the lowest savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select accounts.name , checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of checking accounts for each account name. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , accounts.name from accounts join checking on accounts.custid = checking.custid group by accounts.name" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers with accounts, and how many checking accounts do each of them have? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , accounts.name from accounts join checking on accounts.custid = checking.custid group by accounts.name" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total saving balance for each account name. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( savings.balance ) , accounts.name from accounts join savings on accounts.custid = savings.custid group by accounts.name" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers with accounts, and what are the total savings balances for each? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( savings.balance ) , accounts.name from accounts join savings on accounts.custid = savings.custid group by accounts.name" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of accounts whose checking balance is below the average checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select avg ( balance ) from checking )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers with checking balances lower than the average checking balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select accounts.name from accounts join checking on accounts.custid = checking.custid where checking.balance < ( select avg ( balance ) from checking )" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the saving balance of the account with the highest checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance desc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the savings balance of the account belonging to the customer with the highest checking balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select savings.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance desc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total checking and saving balance of all accounts sorted by the total balance in ascending order. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ + _ from _ order by _ + _ asc | select checking.balance + savings.balance from checking join savings on checking.custid = savings.custid order by checking.balance + savings.balance asc" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the sum of checking and savings balances for all customers, ordered by the total balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ + _ from _ order by _ + _ asc | select checking.balance + savings.balance from checking join savings on checking.custid = savings.custid order by checking.balance + savings.balance asc" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and checking balance of the account with the lowest saving balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select checking.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and checking balance of the account which has the lowest savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select checking.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by savings.balance asc limit 1" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, checking balance and saving balance of all accounts in the bank. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, checking balances, and savings balances for all customers? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ + _ desc | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance desc" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ + _ desc | select checking.balance , savings.balance , accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid order by checking.balance + savings.balance desc" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of accounts whose checking balance is higher than corresponding saving balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where checking.balance > savings.balance" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers with a higher checking balance than savings balance? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ where _ | select accounts.name from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where checking.balance > savings.balance" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ + _ from _ where _ | select accounts.name , savings.balance + checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance < checking.balance" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ + _ from _ where _ | select accounts.name , savings.balance + checking.balance from accounts join checking on accounts.custid = checking.custid join savings on accounts.custid = savings.custid where savings.balance < checking.balance" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select accounts.name , savings.balance from accounts join savings on accounts.custid = savings.custid order by savings.balance desc limit 3" }, { "db_id": "small_bank_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are names and savings balances of the three accounts with the highest savings balances? | accounts : custid , name | savings : custid , balance | checking : custid , balance | savings.custid = accounts.custid | checking.custid = accounts.custid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select accounts.name , savings.balance from accounts join savings on accounts.custid = savings.custid order by savings.balance desc limit 3" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many main stream browsers whose market share is at least 5 exist? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from browser where market_share >= 5" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of browsers in descending order by market share. | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from browser order by market_share desc" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the ids, names and market shares of all browsers. | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ | select id , name , market_share from browser" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum, minimum and average market share of the listed browsers? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( market_share ) , min ( market_share ) , avg ( market_share ) from browser" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and market share of the browser Safari? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ where _ | select id , market_share from browser where name = 'Safari'" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ where _ | select name , operating_system from web_client_accelerator where connection != 'Broadband'" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ where _ | select browser.name from browser join accelerator_compatible_browser on browser.id = accelerator_compatible_browser.browser_id join web_client_accelerator on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id where web_client_accelerator.name = 'CProxy' and accelerator_compatible_browser.compatible_since_year > 1998" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of the web accelerators that are compatible with two or more browsers? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select web_client_accelerator.id , web_client_accelerator.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id group by web_client_accelerator.id having count ( * ) >= 2" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and name of the browser that is compatible with the most web accelerators? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select browser.id , browser.name from browser join accelerator_compatible_browser on browser.id = accelerator_compatible_browser.browser_id group by browser.id order by count ( * ) desc limit 1" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ where _ | select accelerator_compatible_browser.compatible_since_year from accelerator_compatible_browser join browser on accelerator_compatible_browser.browser_id = browser.id join web_client_accelerator on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id where web_client_accelerator.name = 'CACHEbox' and browser.name = 'Internet Explorer'" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different kinds of clients are supported by the web clients accelerators? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct client ) from web_client_accelerator" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accelerators are not compatible with the browsers listed ? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from web_client_accelerator where id not in ( select accelerator_id from accelerator_compatible_browser )" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What distinct accelerator names are compatible with the browswers that have market share higher than 15? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct web_client_accelerator.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where browser.market_share > 15" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'. | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select browser.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where web_client_accelerator.name = 'CACHEbox' intersect select browser.name from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where web_client_accelerator.name = 'Fasterfox'" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'. | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name , operating_system from web_client_accelerator except select web_client_accelerator.name , web_client_accelerator.operating_system from web_client_accelerator join accelerator_compatible_browser on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id join browser on accelerator_compatible_browser.browser_id = browser.id where browser.name = 'Opera'" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which accelerator name contains substring \"Opera\"? | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from web_client_accelerator where name like '%Opera%'" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of web accelerators used for each Operating system. | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select operating_system , count ( * ) from web_client_accelerator group by operating_system" }, { "db_id": "browser_web", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: give me names of all compatible browsers and accelerators in the descending order of compatible year | web_client_accelerator : id , name , operating_system , client , connection | browser : id , name , market_share | accelerator_compatible_browser : accelerator_id , browser_id , compatible_since_year | accelerator_compatible_browser.browser_id = browser.id | accelerator_compatible_browser.accelerator_id = web_client_accelerator.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select browser.name , web_client_accelerator.name from accelerator_compatible_browser join browser on accelerator_compatible_browser.browser_id = browser.id join web_client_accelerator on accelerator_compatible_browser.accelerator_id = web_client_accelerator.id order by accelerator_compatible_browser.compatible_since_year desc" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many wrestlers are there? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from wrestler" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from wrestler" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of wrestlers in descending order of days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from wrestler order by days_held desc" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the wrestlers, ordered descending by days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from wrestler order by days_held desc" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the wrestler with the fewest days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from wrestler order by days_held asc limit 1" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the wrestler who had the lowest number of days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from wrestler order by days_held asc limit 1" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct reigns of wrestlers whose location is not \"Tokyo,Japan\" ? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct reign from wrestler where location != 'Tokyo , Japan'" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the different reigns of wrestlers who are not located in Tokyo, Japan. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct reign from wrestler where location != 'Tokyo , Japan'" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and location of the wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ | select name , location from wrestler" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names and locations of all wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ | select name , location from wrestler" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the elimination moves of wrestlers whose team is \"Team Orton\"? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select elimination_move from elimination where team = 'Team Orton'" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the elimination movies of wrestlers on Team Orton. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select elimination_move from elimination where team = 'Team Orton'" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wrestlers and the elimination moves? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ | select wrestler.name , elimination.elimination_move from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names of wrestlers and their elimination moves. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ | select wrestler.name , elimination.elimination_move from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of wrestlers and the teams in elimination in descending order of days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select wrestler.name , elimination.team from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wrestlers and their teams in elimination, ordered descending by days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select wrestler.name , elimination.team from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the time of elimination of the wrestlers with largest days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc limit 1" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the time of elimination for the wrestler with the most days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id order by wrestler.days_held desc limit 1" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show times of elimination of wrestlers with days held more than 50. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id where wrestler.days_held > 50" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the times of elimination for wrestlers with over 50 days held? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select elimination.time from elimination join wrestler on elimination.wrestler_id = wrestler.wrestler_id where wrestler.days_held > 50" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different teams in eliminations and the number of eliminations from each team. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select team , count ( * ) from elimination group by team" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many eliminations did each team have? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select team , count ( * ) from elimination group by team" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show teams that have suffered more than three eliminations. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select team from elimination group by team having count ( * ) > 3" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which teams had more than 3 eliminations? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select team from elimination group by team having count ( * ) > 3" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the reign and days held of wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ | select reign , days_held from wrestler" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the reigns and days held of all wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ | select reign , days_held from wrestler" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wrestlers days held less than 100? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select name from wrestler where days_held < 100" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of wrestlers with fewer than 100 days held. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select name from wrestler where days_held < 100" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the most common reigns of wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select reign from wrestler group by reign order by count ( * ) desc limit 1" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which reign is the most common among wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select reign from wrestler group by reign order by count ( * ) desc limit 1" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the locations that are shared by more than two wrestlers. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select location from wrestler group by location having count ( * ) > 2" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which locations are shared by more than two wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select location from wrestler group by location having count ( * ) > 2" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of wrestlers that have not been eliminated. | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from wrestler where wrestler_id not in ( select wrestler_id from elimination )" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wrestlers who have never been eliminated? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from wrestler where wrestler_id not in ( select wrestler_id from elimination )" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the teams that have both wrestlers eliminated by \"Orton\" and wrestlers eliminated by \"Benjamin\". | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select team from elimination where eliminated_by = 'Orton' intersect select team from elimination where eliminated_by = 'Benjamin'" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select team from elimination where eliminated_by = 'Orton' intersect select team from elimination where eliminated_by = 'Benjamin'" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of distinct teams that suffer elimination? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct team ) from elimination" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different teams have had eliminated wrestlers? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct team ) from elimination" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the times of elimination by \"Punk\" or \"Orton\". | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select time from elimination where eliminated_by = 'Punk' or eliminated_by = 'Orton'" }, { "db_id": "wrestler", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the times of elimination for any instances in which the elimination was done by Punk or Orton? | wrestler : wrestler_id , name , reign , days_held , location , event | elimination : elimination_id , wrestler_id , team , eliminated_by , elimination_move , time | elimination.wrestler_id = wrestler.wrestler_id | \n\n### Response:\n\nselect _ from _ where _ | select time from elimination where eliminated_by = 'Punk' or eliminated_by = 'Orton'" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many schools are there? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from school" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of schools. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from school" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all school names in alphabetical order. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select school_name from school order by school_name asc" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name, location, mascot for all schools. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ | select school_name , location , mascot from school" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total and average enrollment of all schools? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect sum ( _ ) , avg ( _ ) from _ | select sum ( enrollment ) , avg ( enrollment ) from school" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the mascots for schools with enrollments above the average? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select mascot from school where enrollment > ( select avg ( enrollment ) from school )" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the school with the smallest enrollment. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select school_name from school order by enrollment asc limit 1" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average, maximum, minimum enrollment of all schools. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , min ( _ ) from _ | select avg ( enrollment ) , max ( enrollment ) , min ( enrollment ) from school" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each county along with the number of schools and total enrollment in each county. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ , count ( _ ) , sum ( _ ) from _ group by _ | select county , count ( * ) , sum ( enrollment ) from school group by county" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many donors have endowment for school named \"Glenn\"? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct endowment.donator_name ) from endowment join school on endowment.school_id = school.school_id where school.school_name = 'Glenn'" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List each donator name and the amount of endowment in descending order of the amount of endowment. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc | select donator_name , sum ( amount ) from endowment group by donator_name order by sum ( amount ) desc" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of the schools without any endowment. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select school_name from school where school_id not in ( select school_id from endowment )" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the names of schools with an endowment amount smaller than or equal to 10. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) <= _ | select school.school_name from endowment join school on endowment.school_id = school.school_id group by endowment.school_id having sum ( endowment.amount ) <= 10" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of donors who donated to both school \"Glenn\" and \"Triton.\" | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select endowment.donator_name from endowment join school on endowment.school_id = school.school_id where school.school_name = 'Glenn' intersect select endowment.donator_name from endowment join school on endowment.school_id = school.school_id where school.school_name = 'Triton'" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of all the donors except those whose donation amount less than 9. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select donator_name from endowment except select donator_name from endowment where amount < 9" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the amount and donor name for the largest amount of donation. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select amount , donator_name from endowment order by amount desc limit 1" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many budgets are above 3000 in year 2001 or before? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from budget where budgeted > 3000 and year <= 2001" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000 | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from budget where budgeted > 3000 and year <= 2001" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each school name, its budgeted amount, and invested amount in year 2002 or after. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ | select school.school_name , budget.budgeted , budget.invested from budget join school on budget.school_id = school.school_id where budget.year >= 2002" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all donor names. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct donator_name from endowment" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many budget record has a budget amount smaller than the invested amount? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from budget where budgeted < invested" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total budget amount for school \"Glenn\" in all years? | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( budget.budgeted ) from budget join school on budget.school_id = school.school_id where school.school_name = 'Glenn'" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ or sum ( _ ) > _ | select school.school_name from budget join school on budget.school_id = school.school_id join endowment on school.school_id = endowment.school_id group by school.school_name having sum ( budget.budgeted ) > 100 or sum ( endowment.amount ) > 10" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of schools that have more than one donator with donation amount above 8.5. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) > _ | select school.school_name from endowment join school on endowment.school_id = school.school_id where endowment.amount > 8.5 group by endowment.school_id having count ( * ) > 1" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of schools that have more than one donator whose donation amount is less than 8.5. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ where _ group by _ having count ( _ ) > _ ) | select count ( * ) from ( select * from endowment where amount > 8.5 group by school_id having count ( * ) > 1 )" }, { "db_id": "school_finance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget. | school : school_id , school_name , location , mascot , enrollment , ihsaa_class , ihsaa_football_class , county | budget : school_id , year , budgeted , total_budget_percent_budgeted , invested , total_budget_percent_invested , budget_invested_percent | endowment : endowment_id , school_id , donator_name , amount | budget.school_id = school.school_id | endowment.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ order by _ | select school.school_name , school.mascot , school.ihsaa_football_class from school join budget on school.school_id = budget.school_id where budgeted > 6000 or year < 2003 order by budget.total_budget_percent_invested , budget.total_budget_percent_budgeted" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many buildings are there? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from building" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, street address, and number of floors for all buildings ordered by the number of floors. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , street_address , floors from building order by floors asc" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the tallest building? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from building order by height_feet desc limit 1" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average, maximum, and minimum number of floors for all buildings? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , min ( _ ) from _ | select avg ( floors ) , max ( floors ) , min ( floors ) from building" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of buildings with a height above the average or a number of floors above the average. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) or _ > ( select avg ( _ ) from _ ) | select count ( * ) from building where height_feet > ( select avg ( height_feet ) from building ) or floors > ( select avg ( floors ) from building )" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of buildings with at least 200 feet of height and with at least 20 floors. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ where _ | select name from building where height_feet >= 200 and floors >= 20" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and locations of institutions that are founded after 1990 and have the type \"Private\". | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ where _ | select institution , location from institution where founded > 1990 and type = 'Private'" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show institution types, along with the number of institutions and total enrollment for each type. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ , count ( _ ) , sum ( _ ) from _ group by _ | select type , count ( * ) , sum ( enrollment ) from institution group by type" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the institution type with the largest number of institutions. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select type from institution group by type order by count ( * ) desc limit 1" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ where _ | select type from institution where founded > 1990 and enrollment >= 1000" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of buildings that do not have any institution. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from building where building_id not in ( select building_id from institution )" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of buildings except for those having an institution founded in 2003. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from building except select building.name from building join institution on building.building_id = institution.building_id where institution.founded = 2003" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each building, show the name of the building and the number of institutions in it. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select building.name , count ( * ) from building join institution on building.building_id = institution.building_id group by building.building_id" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and heights of buildings with at least two institutions founded after 1880. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select building.name , building.height_feet from building join institution on building.building_id = institution.building_id where institution.founded > 1880 group by building.building_id having count ( * ) >= 2" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the distinct institution types. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct type from institution" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show institution names along with the number of proteins for each institution. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select institution.institution , count ( * ) from institution join protein on institution.institution_id = protein.institution_id group by institution.institution_id" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many proteins are associated with an institution founded after 1880 or an institution with type \"Private\"? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from institution join protein on institution.institution_id = protein.institution_id where institution.founded > 1880 or institution.type = 'Private'" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the protein name and the institution name. | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect _ from _ | select protein.protein_name , institution.institution from institution join protein on institution.institution_id = protein.institution_id" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many proteins are associated with an institution in a building with at least 20 floors? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from institution join protein on institution.institution_id = protein.institution_id join building on building.building_id = institution.building_id where building.floors >= 20" }, { "db_id": "protein_institute", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many institutions do not have an associated protein in our record? | building : building_id , name , street_address , years_as_tallest , height_feet , floors | institution : institution_id , institution , location , founded , type , enrollment , team , primary_conference , building_id | protein : common_name , protein_name , divergence_from_human_lineage , accession_number , sequence_length , sequence_identity_to_human_protein , institution_id | institution.building_id = building.building_id | protein.institution_id = institution.institution_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from institution where institution_id not in ( select institution_id from protein )" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the locations where no cinema has capacity over 800. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select location from cinema except select location from cinema where capacity > 800" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the locations where some cinemas were opened in both year 2010 and year 2011. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select location from cinema where openning_year = 2010 intersect select location from cinema where openning_year = 2011" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many cinema do we have? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from cinema" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of cinemas. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from cinema" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show name, opening year, and capacity for each cinema. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select name , openning_year , capacity from cinema" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the cinema name and location for cinemas with capacity above average. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name , location from cinema where capacity > ( select avg ( capacity ) from cinema )" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the locations with a cinema? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location from cinema" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct locations that has a cinema. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location from cinema" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the cinema names and opening years in descending order of opening year. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , openning_year from cinema order by openning_year desc" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and location of the cinema with the largest capacity? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , location from cinema order by capacity desc limit 1" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , max ( _ ) from _ where _ | select avg ( capacity ) , min ( capacity ) , max ( capacity ) from cinema where openning_year >= 2011" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each location and the number of cinemas there. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select location , count ( * ) from cinema group by location" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location with the most cinemas opened in year 2010 or later? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select location from cinema where openning_year >= 2010 group by location order by count ( * ) desc limit 1" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the locations with at least two cinemas with capacity above 300. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select location from cinema where capacity > 300 group by location having count ( * ) >= 2" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which locations have 2 or more cinemas with capacity over 300? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select location from cinema where capacity > 300 group by location having count ( * ) >= 2" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the title and director for all films. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select title , directed_by from film" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the title and director of each film? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select title , directed_by from film" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all directors. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct directed_by from film" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are all the directors? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct directed_by from film" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all directors along with the number of films directed by each director. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select directed_by , count ( * ) from film group by directed_by" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is total number of show times per dat for each cinema? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select cinema.name , sum ( schedule.show_times_per_day ) from schedule join cinema on schedule.cinema_id = cinema.cinema_id group by schedule.cinema_id" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the title and maximum price of each film? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select film.title , max ( schedule.price ) from schedule join film on schedule.film_id = film.film_id group by schedule.film_id" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the title and highest price for each film. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select film.title , max ( schedule.price ) from schedule join film on schedule.film_id = film.film_id group by schedule.film_id" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show cinema name, film title, date, and price for each record in schedule. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select cinema.name , film.title , schedule.date , schedule.price from schedule join film on schedule.film_id = film.film_id join cinema on schedule.cinema_id = cinema.cinema_id" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the title and director of the films without any schedule? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title , directed_by from film where film_id not in ( select film_id from schedule )" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show director with the largest number of show times in total. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select film.directed_by from schedule join film on schedule.film_id = film.film_id group by film.directed_by order by sum ( schedule.show_times_per_day ) desc limit 1" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the locations that have more than one movie theater with capacity above 300. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) > _ | select location from cinema where capacity > 300 group by location having count ( * ) > 1" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which locations are there more than one movie theater with capacity above 300? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) > _ | select location from cinema where capacity > 300 group by location having count ( * ) > 1" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many films have the word 'Dummy' in their titles? | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from film where title like '%Dummy%'" }, { "db_id": "cinema", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of films whose title contains the word 'Dummy'. | film : film_id , rank_in_series , number_in_season , title , directed_by , original_air_date , production_code | cinema : cinema_id , name , openning_year , capacity , location | schedule : cinema_id , film_id , date , show_times_per_day , price | schedule.cinema_id = cinema.cinema_id | schedule.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from film where title like '%Dummy%'" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Are the customers holding coupons with amount 500 bad or good? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.good_or_bad_customer from customers join discount_coupons on customers.coupon_id = discount_coupons.coupon_id where discount_coupons.coupon_amount = 500" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many bookings did each customer make? List the customer id, first name, and the count. | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customers.customer_id , customers.first_name , count ( * ) from customers join bookings on customers.customer_id = bookings.customer_id group by customers.customer_id" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum total amount paid by a customer? List the customer id and amount. | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select customer_id , sum ( amount_paid ) from payments group by customer_id order by sum ( amount_paid ) desc limit 1" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and the amount of refund of the booking that incurred the most times of payments? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select bookings.booking_id , bookings.amount_of_refund from bookings join payments on bookings.booking_id = payments.booking_id group by bookings.booking_id order by count ( * ) desc limit 1" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the product that is booked for 3 times? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select product_id from products_booked group by product_id having count ( * ) = 3" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the product description of the product booked with an amount of 102.76? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ | select products_for_hire.product_description from products_booked join products_for_hire on products_booked.product_id = products_for_hire.product_id where products_booked.booked_amount = 102.76" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the start date and end date of the booking that has booked the product named 'Book collection A'? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ | select bookings.booking_start_date , bookings.booking_end_date from products_for_hire join products_booked on products_for_hire.product_id = products_booked.product_id join bookings on products_booked.booking_id = bookings.booking_id where products_for_hire.product_name = 'Book collection A'" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of products whose availability equals to 1? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ | select products_for_hire.product_name from view_product_availability join products_for_hire on view_product_availability.product_id = products_for_hire.product_id where view_product_availability.available_yn = 1" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different product types are there? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct product_type_code ) from products_for_hire" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name, last name, and gender of all the good customers? Order by their last name. | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select first_name , last_name , gender_mf from customers where good_or_bad_customer = 'good' order by last_name asc" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average amount due for all the payments? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( amount_due ) from payments" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum, minimum, and average booked count for the products booked? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( booked_count ) , min ( booked_count ) , avg ( booked_count ) from products_booked" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the distinct payment types? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct payment_type_code from payments" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the daily hire costs for the products with substring 'Book' in its name? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select daily_hire_cost from products_for_hire where product_name like '%Book%'" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are never booked with amount higher than 200? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from products_for_hire where product_id not in ( select product_id from products_booked where booked_amount > 200 )" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the coupon amount of the coupons owned by both good and bad customers? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select discount_coupons.coupon_amount from discount_coupons join customers on discount_coupons.coupon_id = customers.coupon_id where customers.good_or_bad_customer = 'good' intersect select discount_coupons.coupon_amount from discount_coupons join customers on discount_coupons.coupon_id = customers.coupon_id where customers.good_or_bad_customer = 'bad'" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check' | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ | select payment_date from payments where amount_paid > 300 or payment_type_code = 'Check'" }, { "db_id": "products_for_hire", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20? | discount_coupons : coupon_id , date_issued , coupon_amount | customers : customer_id , coupon_id , good_or_bad_customer , first_name , last_name , gender_mf , date_became_customer , date_last_hire | bookings : booking_id , customer_id , booking_status_code , returned_damaged_yn , booking_start_date , booking_end_date , count_hired , amount_payable , amount_of_discount , amount_outstanding , amount_of_refund | products_for_hire : product_id , product_type_code , daily_hire_cost , product_name , product_description | payments : payment_id , booking_id , customer_id , payment_type_code , amount_paid_in_full_yn , payment_date , amount_due , amount_paid | products_booked : booking_id , product_id , returned_yn , returned_late_yn , booked_count , booked_amount | view_product_availability : product_id , booking_id , status_date , available_yn | customers.coupon_id = discount_coupons.coupon_id | bookings.customer_id = customers.customer_id | payments.customer_id = customers.customer_id | payments.booking_id = bookings.booking_id | products_booked.product_id = products_for_hire.product_id | products_booked.booking_id = bookings.booking_id | view_product_availability.product_id = products_for_hire.product_id | view_product_availability.booking_id = bookings.booking_id | \n\n### Response:\n\nselect _ from _ where _ | select product_name , product_description from products_for_hire where product_type_code = 'Cutlery' and daily_hire_cost < 20" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many phones are there? | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from phone" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of phones in ascending order of price. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from phone order by price asc" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the memories and carriers of phones? | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ | select memory_in_g , carrier from phone" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct carriers of phones with memories bigger than 32. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct carrier from phone where memory_in_g > 32" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of phones with carrier either \"Sprint\" or \"TMobile\". | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ where _ | select name from phone where carrier = 'Sprint' or carrier = 'TMobile'" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the carrier of the most expensive phone? | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select carrier from phone order by price desc limit 1" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different carriers of phones together with the number of phones with each carrier. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select carrier , count ( * ) from phone group by carrier" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most frequently used carrier of the phones. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select carrier from phone group by carrier order by count ( * ) desc limit 1" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select carrier from phone where memory_in_g < 32 intersect select carrier from phone where memory_in_g > 64" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of phones and the districts of markets they are on. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ | select phone.name , market.district from phone_market join market on phone_market.market_id = market.market_id join phone on phone_market.phone_id = phone.phone_id" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select phone.name , market.district from phone_market join market on phone_market.market_id = market.market_id join phone on phone_market.phone_id = phone.phone_id order by market.ranking asc" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of phones that are on market with number of shops greater than 50. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ where _ | select phone.name from phone_market join market on phone_market.market_id = market.market_id join phone on phone_market.phone_id = phone.phone_id where market.num_of_shops > 50" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each phone, show its names and total number of stocks. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select phone.name , sum ( phone_market.num_of_stock ) from phone_market join phone on phone_market.phone_id = phone.phone_id group by phone.name" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) >= _ order by sum ( _ ) desc | select phone.name from phone_market join phone on phone_market.phone_id = phone.phone_id group by phone.name having sum ( phone_market.num_of_stock ) >= 2000 order by sum ( phone_market.num_of_stock ) desc" }, { "db_id": "phone_market", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of phones that are not on any market. | phone : name , phone_id , memory_in_g , carrier , price | market : market_id , district , num_of_employees , num_of_shops , ranking | phone_market : market_id , phone_id , num_of_stock | phone_market.phone_id = phone.phone_id | phone_market.market_id = market.market_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from phone where phone_id not in ( select phone_id from phone_market )" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many gas companies are there? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from company" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of companies? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from company" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the company name and rank for all companies in the decreasing order of their sales. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select company , rank from company order by sales_billion desc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and rank of every company ordered by descending number of sales? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select company , rank from company order by sales_billion desc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the company name and the main industry for all companies whose headquarters are not from USA. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ | select company , main_industry from company where headquarters != 'USA'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the companies and main industries of all companies that are not headquartered in the United States? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ | select company , main_industry from company where headquarters != 'USA'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all company names and headquarters in the descending order of market value. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select company , headquarters from company order by market_value desc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and headquarters of all companies ordered by descending market value? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select company , headquarters from company order by market_value desc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show minimum, maximum, and average market value for all companies. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( market_value ) , max ( market_value ) , avg ( market_value ) from company" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the minimum, maximum, and average market value for every company? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( market_value ) , max ( market_value ) , avg ( market_value ) from company" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all main industry for all companies. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct main_industry from company" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different main industries for all companies? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct main_industry from company" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all headquarters and the number of companies in each headquarter. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select headquarters , count ( * ) from company group by headquarters" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each headquarter, what are the headquarter and how many companies are centered there? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select headquarters , count ( * ) from company group by headquarters" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all main industry and total market value in each industry. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select main_industry , sum ( market_value ) from company group by main_industry" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the main indstries and total market value for each industry? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select main_industry , sum ( market_value ) from company group by main_industry" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the main industry with highest total market value and its number of companies. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select main_industry , count ( * ) from company group by main_industry order by sum ( market_value ) desc limit 1" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each main industry, what is the total number of companies for the industry with the highest total market value? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by sum ( _ ) desc limit _ | select main_industry , count ( * ) from company group by main_industry order by sum ( market_value ) desc limit 1" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show headquarters with at least two companies in the banking industry. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select headquarters from company where main_industry = 'Banking' group by headquarters having count ( * ) >= 2" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the headquarters with at least two companies in the banking industry? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select headquarters from company where main_industry = 'Banking' group by headquarters having count ( * ) >= 2" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show gas station id, location, and manager_name for all gas stations ordered by open year. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select station_id , location , manager_name from gas_station order by open_year asc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the gas station ids, locations, and manager names for the gas stations ordered by opening year? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select station_id , location , manager_name from gas_station order by open_year asc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many gas station are opened between 2000 and 2005? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ between _ and _ | select count ( * ) from gas_station where open_year between 2000 and 2005" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of gas stations that opened between 2000 and 2005? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ between _ and _ | select count ( * ) from gas_station where open_year between 2000 and 2005" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all locations and the number of gas stations in each location ordered by the count. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select location , count ( * ) from gas_station group by location order by count ( * ) asc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each location, how many gas stations are there in order? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select location , count ( * ) from gas_station group by location order by count ( * ) asc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all headquarters with both a company in banking industry and a company in Oil and gas. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select headquarters from company where main_industry = 'Banking' intersect select headquarters from company where main_industry = 'Oil and gas'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the headquarters that have both a company in the banking and 'oil and gas' industries? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select headquarters from company where main_industry = 'Banking' intersect select headquarters from company where main_industry = 'Oil and gas'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all headquarters without a company in banking industry. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select headquarters from company except select headquarters from company where main_industry = 'Banking'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the headquarters without companies that are in the banking industry? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select headquarters from company except select headquarters from company where main_industry = 'Banking'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the company name with the number of gas station. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select company.company , count ( * ) from station_company join company on station_company.company_id = company.company_id group by station_company.company_id" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each company id, what are the companies and how many gas stations does each one operate? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select company.company , count ( * ) from station_company join company on station_company.company_id = company.company_id group by station_company.company_id" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show company name and main industry without a gas station. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select company , main_industry from company where company_id not in ( select company_id from station_company )" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the main industries of the companies without gas stations and what are the companies? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select company , main_industry from company where company_id not in ( select company_id from station_company )" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the manager name for gas stations belonging to the ExxonMobil company. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ | select gas_station.manager_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.company = 'ExxonMobil'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the managers for gas stations that are operated by the ExxonMobil company? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ | select gas_station.manager_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.company = 'ExxonMobil'" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all locations where a gas station for company with market value greater than 100 is located. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ | select gas_station.location from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.market_value > 100" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the locations that have gas stations owned by a company with a market value greater than 100? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ | select gas_station.location from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id where company.market_value > 100" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the manager name with most number of gas stations opened after 2000. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select manager_name from gas_station where open_year > 2000 group by manager_name order by count ( * ) desc limit 1" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the manager with the most gas stations that opened after 2000? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select manager_name from gas_station where open_year > 2000 group by manager_name order by count ( * ) desc limit 1" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: order all gas station locations by the opening year. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select location from gas_station order by open_year asc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the locations of all the gas stations ordered by opening year? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select location from gas_station order by open_year asc" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc , _ | select rank , company , market_value from company where main_industry = 'Banking' order by sales_billion asc , profits_billion" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc , _ | select rank , company , market_value from company where main_industry = 'Banking' order by sales_billion asc , profits_billion" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts. | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select gas_station.location , gas_station.representative_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id order by company.assets_billion desc limit 3" }, { "db_id": "gas_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets? | company : company_id , rank , company , headquarters , main_industry , sales_billion , profits_billion , assets_billion , market_value | gas_station : station_id , open_year , location , manager_name , vice_manager_name , representative_name | station_company : station_id , company_id , rank_of_the_year | station_company.company_id = company.company_id | station_company.station_id = gas_station.station_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select gas_station.location , gas_station.representative_name from station_company join company on station_company.company_id = company.company_id join gas_station on station_company.station_id = gas_station.station_id order by company.assets_billion desc limit 3" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many regions do we have? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from region" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of regions. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from region" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct region names ordered by their labels. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct region_name from region order by label asc" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different region names, ordered by labels? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct region_name from region order by label asc" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many parties do we have? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct party_name ) from party" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different parties. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct party_name ) from party" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ministers and the time they took and left office, listed by the time they left office. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select minister , took_office , left_office from party order by left_office asc" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select minister , took_office , left_office from party order by left_office asc" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the minister who took office after 1961 or before 1959. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select minister from party where took_office > 1961 or took_office < 1959" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the ministers who took office after 1961 or before 1959? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select minister from party where took_office > 1961 or took_office < 1959" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all ministers who do not belong to Progress Party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select minister from party where party_name != 'Progress Party'" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which ministers are not a part of the Progress Party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select minister from party where party_name != 'Progress Party'" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all ministers and parties they belong to in descending order of the time they took office. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select minister , party_name from party order by took_office desc" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the ministers and what parties do they belong to, listed descending by the times they took office? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select minister , party_name from party order by took_office desc" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the minister who left office at the latest time. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select minister from party order by left_office desc limit 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which minister left office the latest? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select minister from party order by left_office desc limit 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List member names and their party names. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ | select member.member_name , party.party_name from member join party on member.party_id = party.party_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of members and their corresponding parties? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ | select member.member_name , party.party_name from member join party on member.party_id = party.party_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all party names and the number of members in each party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from member join party on member.party_id = party.party_id group by member.party_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many members are in each party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from member join party on member.party_id = party.party_id group by member.party_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of party with most number of members? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select party.party_name from member join party on member.party_id = party.party_id group by member.party_id order by count ( * ) desc limit 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the party with the most members. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select party.party_name from member join party on member.party_id = party.party_id group by member.party_id order by count ( * ) desc limit 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all party names and their region names. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ | select party.party_name , region.region_name from party join region on party.region_id = region.region_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of parties and their respective regions? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ | select party.party_name , region.region_name from party join region on party.region_id = region.region_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of parties that does not have any members. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select party_name from party where party_id not in ( select party_id from member )" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of parties that have no members? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select party_name from party where party_id not in ( select party_id from member )" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the member names which are in both the party with id 3 and the party with id 1. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which member names are shared among members in the party with the id 3 and the party with the id 1? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show member names that are not in the Progress Party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select member.member_name from member join party on member.party_id = party.party_id where party.party_name != 'Progress Party'" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which member names corresponding to members who are not in the Progress Party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select member.member_name from member join party on member.party_id = party.party_id where party.party_name != 'Progress Party'" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many party events do we have? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from party_events" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of party events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from party_events" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show party names and the number of events for each party. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from party_events join party on party_events.party_id = party.party_id group by party_events.party_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many events are there for each party? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party.party_name , count ( * ) from party_events join party on party_events.party_id = party.party_id group by party_events.party_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all member names who are not in charge of any event. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select member_name from member except select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of members who are not in charge of any events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select member_name from member except select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of parties with at least 2 events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select party.party_name from party_events join party on party_events.party_id = party.party_id group by party_events.party_id having count ( * ) >= 2" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of parties that have two or more events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select party.party_name from party_events join party on party_events.party_id = party.party_id group by party_events.party_id having count ( * ) >= 2" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of member in charge of greatest number of events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id group by party_events.member_in_charge_id order by count ( * ) desc limit 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the member who is in charge of the most events. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select member.member_name from member join party_events on member.member_id = party_events.member_in_charge_id group by party_events.member_in_charge_id order by count ( * ) desc limit 1" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the event names that have more than 2 records. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select event_name from party_events group by event_name having count ( * ) > 2" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which event names were used more than twice for party events? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select event_name from party_events group by event_name having count ( * ) > 2" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many Annual Meeting events happened in the United Kingdom region? | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from region join party on region.region_id = party.region_id join party_events on party.party_id = party_events.party_id where region.region_name = 'United Kingdom' and party_events.event_name = 'Annaual Meeting'" }, { "db_id": "party_people", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of Annual Meeting events that took place in the region of the United Kingdom. | region : region_id , region_name , date , label , format , catalogue | party : party_id , minister , took_office , left_office , region_id , party_name | member : member_id , member_name , party_id , in_office | party_events : event_id , event_name , party_id , member_in_charge_id | party.region_id = region.region_id | member.party_id = party.party_id | party_events.member_in_charge_id = member.member_id | party_events.party_id = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from region join party on region.region_id = party.region_id join party_events on party.party_id = party_events.party_id where region.region_name = 'United Kingdom' and party_events.event_name = 'Annaual Meeting'" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many pilots are there? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from pilot" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of pilots in ascending order of rank. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select pilot_name from pilot order by rank asc" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the positions and teams of pilots? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ | select position , team from pilot" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct positions of pilots older than 30. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct position from pilot where age > 30" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of pilots from team \"Bradley\" or \"Fordham\". | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ where _ | select pilot_name from pilot where team = 'Bradley' or team = 'Fordham'" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the joined year of the pilot of the highest rank? | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select join_year from pilot order by rank asc limit 1" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select nationality , count ( * ) from pilot group by nationality" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common nationality of pilots. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nationality from pilot group by nationality order by count ( * ) desc limit 1" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select position from pilot where join_year < 2000 intersect select position from pilot where join_year > 2005" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of pilots and models of aircrafts they have flied with. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ | select pilot.pilot_name , aircraft.model from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select pilot.pilot_name , aircraft.fleet_series from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id order by pilot.rank asc" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the fleet series of the aircrafts flied by pilots younger than 34 | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.fleet_series from pilot_record join aircraft on pilot_record.aircraft_id = aircraft.aircraft_id join pilot on pilot_record.pilot_id = pilot.pilot_id where pilot.age < 34" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of pilots and the number of records they have. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select pilot.pilot_name , count ( * ) from pilot_record join pilot on pilot_record.pilot_id = pilot.pilot_id group by pilot.pilot_name" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of pilots that have more than one record. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select pilot.pilot_name , count ( * ) from pilot_record join pilot on pilot_record.pilot_id = pilot.pilot_id group by pilot.pilot_name having count ( * ) > 1" }, { "db_id": "pilot_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of pilots that do not have any record. | aircraft : aircraft_id , order_year , manufacturer , model , fleet_series , powertrain , fuel_propulsion | pilot : pilot_id , pilot_name , rank , age , nationality , position , join_year , team | pilot_record : record_id , pilot_id , aircraft_id , date | pilot_record.aircraft_id = aircraft.aircraft_id | pilot_record.pilot_id = pilot.pilot_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select pilot_name from pilot where pilot_id not in ( select pilot_id from pilot_record )" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What document status codes do we have? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ | select document_status_code from ref_document_status" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of document status code 'working'? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select document_status_description from ref_document_status where document_status_code = 'working'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What document type codes do we have? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ | select document_type_code from ref_document_types" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of document type 'Paper'? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_description from ref_document_types where document_type_code = 'Paper'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the shipping agent names? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ | select shipping_agent_name from ref_shipping_agents" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the shipping agent code of shipping agent UPS? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select shipping_agent_code from ref_shipping_agents where shipping_agent_name = 'UPS'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all role codes? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ | select role_code from roles" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of role code ED? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select role_description from roles where role_code = 'ED'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees do we have? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from employees" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the role of the employee named Koby? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select roles.role_description from roles join employees on roles.role_code = employees.role_code where employees.employee_name = 'Koby'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all document ids and receipt dates of documents. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ | select document_id , receipt_date from documents" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees does each role have? List role description, id and number of employees. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select roles.role_description , employees.role_code , count ( * ) from roles join employees on roles.role_code = employees.role_code group by employees.role_code" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List roles that have more than one employee. List the role description and number of employees. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select roles.role_description , count ( employees.employee_id ) from roles join employees on employees.role_code = roles.role_code group by employees.role_code having count ( employees.employee_id ) > 1" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the document status description of the document with id 1? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_document_status.document_status_description from ref_document_status join documents on documents.document_status_code = ref_document_status.document_status_code where documents.document_id = 1" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents have the status code done? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from documents where document_status_code = 'done'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the document type code for the document with the id 2. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_code from documents where document_id = 2" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the document ids for any documents with the status code done and the type code paper. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select document_id from documents where document_status_code = 'done' and document_type_code = 'Paper'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the shipping agent of the document with id 2? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_shipping_agents.shipping_agent_name from ref_shipping_agents join documents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where documents.document_id = 2" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents were shipped by USPS? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from ref_shipping_agents join documents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where ref_shipping_agents.shipping_agent_name = 'USPS'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which shipping agent shipped the most documents? List the shipping agent name and the number of documents. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select ref_shipping_agents.shipping_agent_name , count ( documents.document_id ) from ref_shipping_agents join documents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code group by ref_shipping_agents.shipping_agent_code order by count ( documents.document_id ) desc limit 1" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the receipt date of the document with id 3? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select receipt_date from documents where document_id = 3" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What address was the document with id 4 mailed to? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.address_details from addresses join documents_mailed on documents_mailed.mailed_to_address_id = addresses.address_id where document_id = 4" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the mail date of the document with id 7? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select mailing_date from documents_mailed where document_id = 7" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select document_id from documents where document_status_code = 'done' and document_type_code = 'Paper' except select document_id from documents join ref_shipping_agents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where ref_shipping_agents.shipping_agent_name = 'USPS'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select document_id from documents where document_status_code = 'done' and document_type_code = 'Paper' intersect select document_id from documents join ref_shipping_agents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where ref_shipping_agents.shipping_agent_name = 'USPS'" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is draft detail of the document with id 7? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select draft_details from document_drafts where document_id = 7" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many draft copies does the document with id 2 have? | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from draft_copies where document_id = 2" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which document has the most draft copies? List its document id and number of draft copies. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select document_id , count ( copy_number ) from draft_copies group by document_id order by count ( copy_number ) desc limit 1" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which documents have more than 1 draft copies? List document id and number of draft copies. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select document_id , count ( * ) from draft_copies group by document_id having count ( * ) > 1" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all employees in the circulation history of the document with id 1. List the employee's name. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.employee_name from employees join circulation_history on circulation_history.employee_id = employees.employee_id where circulation_history.document_id = 1" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the employees who have not showed up in any circulation history of documents. List the employee's name. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select employee_name from employees except select employees.employee_name from employees join circulation_history on circulation_history.employee_id = employees.employee_id" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select employees.employee_name , count ( * ) from employees join circulation_history on circulation_history.employee_id = employees.employee_id group by circulation_history.document_id , circulation_history.draft_number , circulation_history.copy_number order by count ( * ) desc limit 1" }, { "db_id": "cre_Doc_Control_Systems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees. | ref_document_types : document_type_code , document_type_description | roles : role_code , role_description | addresses : address_id , address_details | ref_document_status : document_status_code , document_status_description | ref_shipping_agents : shipping_agent_code , shipping_agent_name , shipping_agent_description | documents : document_id , document_status_code , document_type_code , shipping_agent_code , receipt_date , receipt_number , other_details | employees : employee_id , role_code , employee_name , other_details | document_drafts : document_id , draft_number , draft_details | draft_copies : document_id , draft_number , copy_number | circulation_history : document_id , draft_number , copy_number , employee_id | documents_mailed : document_id , mailed_to_address_id , mailing_date | documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code | documents.document_status_code = ref_document_status.document_status_code | documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_drafts.document_id = documents.document_id | draft_copies.document_id = document_drafts.document_id | draft_copies.draft_number = document_drafts.draft_number | circulation_history.employee_id = employees.employee_id | circulation_history.document_id = draft_copies.document_id | circulation_history.draft_number = draft_copies.draft_number | circulation_history.copy_number = draft_copies.copy_number | documents_mailed.mailed_to_address_id = addresses.address_id | documents_mailed.document_id = documents.document_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select document_id , count ( distinct employee_id ) from circulation_history group by document_id" }, { "db_id": "company_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all department names ordered by their starting date. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | \n\n### Response:\n\nselect _ from _ order by _ asc | select dname from department order by mgr_start_date asc" }, { "db_id": "company_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find all dependent names who have a spouse relation with some employee. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | \n\n### Response:\n\nselect _ from _ where _ | select dependent_name from dependent where relationship = 'Spouse'" }, { "db_id": "company_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many female dependents are there? | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from dependent where sex = 'F'" }, { "db_id": "company_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of departments that are located in Houston. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | \n\n### Response:\n\nselect _ from _ where _ | select department.dname from department join dept_locations on department.dnumber = dept_locations.dnumber where dept_locations.dlocation = 'Houston'" }, { "db_id": "company_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the first names and last names of employees who earn more than 30000 in salary. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from employee where salary > 30000" }, { "db_id": "company_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of employees of each gender whose salary is lower than 50000. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , sex from employee where salary < 50000 group by sex" }, { "db_id": "company_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list the first and last names, and the addresses of all employees in the ascending order of their birth date. | works_on : essn , pno , hours | employee : fname , minit , lname , ssn , bdate , address , sex , salary , super_ssn , dno | department : dname , dnumber , mgr_ssn , mgr_start_date | project : pname , pnumber , plocation , dnum | dependent : essn , dependent_name , sex , bdate , relationship | dept_locations : dnumber , dlocation | \n\n### Response:\n\nselect _ from _ order by _ asc | select fname , lname , address from employee order by bdate asc" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the event details of the services that have the type code 'Marriage'? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ where _ | select events.event_details from events join services on events.service_id = services.service_id where services.service_type_code = 'Marriage'" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and details of events that have more than one participants? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select events.event_id , events.event_details from events join participants_in_events on events.event_id = participants_in_events.event_id group by events.event_id having count ( * ) > 1" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many events have each participants attended? List the participant id, type and the number. | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select participants.participant_id , participants.participant_type_code , count ( * ) from participants join participants_in_events on participants.participant_id = participants_in_events.participant_id group by participants.participant_id" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the the participant ids, type code and details? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ | select participant_id , participant_type_code , participant_details from participants" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many participants belong to the type 'Organizer'? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from participants where participant_type_code = 'Organizer'" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the type of the services in alphabetical order. | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select service_type_code from services order by service_type_code asc" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the service id and details for the events. | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ | select service_id , event_details from events" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many events had participants whose details had the substring 'Dr.' | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from participants join participants_in_events on participants.participant_id = participants_in_events.participant_id where participants.participant_details like '%Dr.%'" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common participant type? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select participant_type_code from participants group by participant_type_code order by count ( * ) desc limit 1" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which service id and type has the least number of participants? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select events.service_id , services.service_type_code from participants join participants_in_events on participants.participant_id = participants_in_events.participant_id join events on participants_in_events.event_id = events.event_id join services on events.service_id = services.service_id group by events.service_id order by count ( * ) asc limit 1" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the event with the most participants? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select event_id from participants_in_events group by event_id order by count ( * ) desc limit 1" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which events id does not have any participant with detail 'Kenyatta Kuhn'? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select event_id from events except select participants_in_events.event_id from participants_in_events join participants on participants_in_events.participant_id = participants.participant_id where participant_details = 'Kenyatta Kuhn'" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which services type had both successful and failure event details? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select services.service_type_code from services join events on services.service_id = events.service_id where events.event_details = 'Success' intersect select services.service_type_code from services join events on services.service_id = events.service_id where events.event_details = 'Fail'" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many events did not have any participants? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from events where event_id not in ( select event_id from participants_in_events )" }, { "db_id": "local_govt_in_alabama", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the distinct participant ids who attended any events? | services : service_id , service_type_code | participants : participant_id , participant_type_code , participant_details | events : event_id , service_id , event_details | participants_in_events : event_id , participant_id | events.service_id = services.service_id | participants_in_events.event_id = events.event_id | participants_in_events.participant_id = participants.participant_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct participant_id ) from participants_in_events" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the race held most recently? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from races order by date desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the race that occurred most recently? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from races order by date desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and date of the most recent race? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , date from races order by date desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and date of the race that occurred most recently? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , date from races order by date desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all races held in 2017. | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select name from races where year = 2017" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the races that occurred in the year 2017? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select name from races where year = 2017" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct names of all races held between 2014 and 2017? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ between _ and _ | select distinct name from races where year between 2014 and 2017" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the unique names of all race held between 2014 and 2017? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ between _ and _ | select distinct name from races where year between 2014 and 2017" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.forename , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid where laptimes.milliseconds < 93000" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.forename , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid where laptimes.milliseconds < 93000" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.driverid , drivers.nationality from drivers join laptimes on drivers.driverid = laptimes.driverid where laptimes.milliseconds > 100000" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.driverid , drivers.nationality from drivers join laptimes on drivers.driverid = laptimes.driverid where laptimes.milliseconds > 100000" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the forename and surname of the driver who has the smallest laptime? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select drivers.forename , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid order by laptimes.milliseconds asc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the forename and surname of the driver with the shortest laptime? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select drivers.forename , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid order by laptimes.milliseconds asc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and family name of the driver who has the longest laptime? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select drivers.driverid , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid order by laptimes.milliseconds desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and last name of the driver with the longest laptime? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select drivers.driverid , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid order by laptimes.milliseconds desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select drivers.driverid , drivers.forename , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid where position = '1' group by drivers.driverid having count ( * ) >= 2" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id, first name, and last name of the driver who was in the first position for laptime at least twice? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select drivers.driverid , drivers.forename , drivers.surname from drivers join laptimes on drivers.driverid = laptimes.driverid where position = '1' group by drivers.driverid having count ( * ) >= 2" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many drivers participated in the race Australian Grand Prix held in 2009? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from results join races on results.raceid = races.raceid where races.name = 'Australian Grand Prix' and year = 2009" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many drivers were in the Australian Grand Prix held in 2009? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from results join races on results.raceid = races.raceid where races.name = 'Australian Grand Prix' and year = 2009" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many drivers did not participate in the races held in 2009? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct driverid ) from results where raceid not in ( select raceid from races where year != 2009 )" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many drivers did not race in 2009? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct driverid ) from results where raceid not in ( select raceid from races where year != 2009 )" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of names and years of races that had any driver whose forename is Lewis? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select races.name , races.year from results join races on results.raceid = races.raceid join drivers on results.driverid = drivers.driverid where drivers.forename = 'Lewis'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and years of all races that had a driver with the last name Lewis? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select races.name , races.year from results join races on results.raceid = races.raceid join drivers on results.driverid = drivers.driverid where drivers.forename = 'Lewis'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the forename and surname of drivers whose nationality is German? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select forename , surname from drivers where nationality = 'German'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of all the German drivers? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select forename , surname from drivers where nationality = 'German'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select results.driverid , drivers.forename from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Australian Grand Prix' intersect select results.driverid , drivers.forename from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Chinese Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select results.driverid , drivers.forename from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Australian Grand Prix' intersect select results.driverid , drivers.forename from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Chinese Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select drivers.forename , drivers.surname from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Australian Grand Prix' except select drivers.forename , drivers.surname from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Chinese Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select drivers.forename , drivers.surname from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Australian Grand Prix' except select drivers.forename , drivers.surname from races join results on races.raceid = results.raceid join drivers on results.driverid = drivers.driverid where races.name = 'Chinese Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the forenames of distinct drivers who was in position 1 as standing and won? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.forename from drivers join driverstandings on drivers.driverid = driverstandings.driverid where driverstandings.position = 1 and driverstandings.wins = 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the different first names of the drivers who are in position as standing and won? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.forename from drivers join driverstandings on drivers.driverid = driverstandings.driverid where driverstandings.position = 1 and driverstandings.wins = 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.forename from drivers join driverstandings on drivers.driverid = driverstandings.driverid where driverstandings.position = 1 and driverstandings.wins = 1 and driverstandings.points > 20" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct drivers.forename from drivers join driverstandings on drivers.driverid = driverstandings.driverid where driverstandings.position = 1 and driverstandings.wins = 1 and driverstandings.points > 20" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the numbers of constructors for different nationalities? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , nationality from constructors group by nationality" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each nationality, how many different constructors are there? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , nationality from constructors group by nationality" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the numbers of races for each constructor id? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , constructorid from constructorstandings group by constructorid" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each constructor id, how many races are there? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , constructorid from constructorstandings group by constructorid" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of races that were held after 2017 and the circuits were in the country of Spain? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select races.name from races join circuits on races.circuitid = circuits.circuitid where circuits.country = 'Spain' and races.year > 2017" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the races held after 2017 in Spain? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select races.name from races join circuits on races.circuitid = circuits.circuitid where circuits.country = 'Spain' and races.year > 2017" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the unique names of races that held after 2000 and the circuits were in Spain? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct races.name from races join circuits on races.circuitid = circuits.circuitid where circuits.country = 'Spain' and races.year > 2000" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all races held after 2000 in Spain? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct races.name from races join circuits on races.circuitid = circuits.circuitid where circuits.country = 'Spain' and races.year > 2000" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841. | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select max ( _ ) from _ where _ ) | select distinct driverid , stop from pitstops where duration < ( select max ( duration ) from pitstops where raceid = 841 )" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select max ( _ ) from _ where _ ) | select distinct driverid , stop from pitstops where duration < ( select max ( duration ) from pitstops where raceid = 841 )" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct driverid , stop from pitstops where duration > ( select min ( duration ) from pitstops where raceid = 841 )" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct driverid , stop from pitstops where duration > ( select min ( duration ) from pitstops where raceid = 841 )" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the forenames of all distinct drivers in alphabetical order? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct forename from drivers order by forename asc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all the different drivers in alphabetical order? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct forename from drivers order by forename asc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct races in reversed lexicographic order? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ order by _ desc | select distinct name from races order by name desc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of all the races in reverse alphabetical order? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect distinct _ from _ order by _ desc | select distinct name from races order by name desc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of races held between 2009 and 2011? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from races where year between 2009 and 2011" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all races held between 2009 and 2011? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from races where year between 2009 and 2011" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of races held after 12:00:00 or before 09:00:00? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select name from races where time > '12:00:00' or time < '09:00:00'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all races that occurred after 12:00:00 or before 09:00:00? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select name from races where time > '12:00:00' or time < '09:00:00'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ union select _ from _ group by _ having count ( _ ) > _ | select drivers.forename , drivers.surname , drivers.driverid from drivers join pitstops on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) > 8 union select drivers.forename , drivers.surname , drivers.driverid from drivers join results on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) > 5" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ union select _ from _ group by _ having count ( _ ) > _ | select drivers.forename , drivers.surname , drivers.driverid from drivers join pitstops on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) > 8 union select drivers.forename , drivers.surname , drivers.driverid from drivers join results on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) > 5" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ intersect select _ from _ group by _ having count ( _ ) > _ | select drivers.surname , drivers.driverid from drivers join pitstops on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) = 11 intersect select drivers.surname , drivers.driverid from drivers join results on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) > 5" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ intersect select _ from _ group by _ having count ( _ ) > _ | select drivers.surname , drivers.driverid from drivers join pitstops on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) = 11 intersect select drivers.surname , drivers.driverid from drivers join results on drivers.driverid = results.driverid group by drivers.driverid having count ( * ) > 5" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and last name of the driver who participated in the most races after 2010? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select drivers.driverid , drivers.surname from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid where races.year > 2010 group by drivers.driverid order by count ( * ) desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and last name of the driver who participated in the most races after 2010? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select drivers.driverid , drivers.surname from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid where races.year > 2010 group by drivers.driverid order by count ( * ) desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of circuits that belong to UK or Malaysia? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select name from circuits where country = 'UK' or country = 'Malaysia'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the circuits that are in the UK or Malaysia? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select name from circuits where country = 'UK' or country = 'Malaysia'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and location of circuits that belong to France or Belgium? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select circuitid , location from circuits where country = 'France' or country = 'Belgium'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and locations of all circuits in France or Belgium? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select circuitid , location from circuits where country = 'France' or country = 'Belgium'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of Japanese constructors that have once earned more than 5 points? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select constructors.name from constructors join constructorstandings on constructors.constructorid = constructorstandings.constructorid where constructors.nationality = 'Japanese' and constructorstandings.points > 5" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the Japanese constructors that have earned more than 5 points? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ where _ | select constructors.name from constructors join constructorstandings on constructors.constructorid = constructorstandings.constructorid where constructors.nationality = 'Japanese' and constructorstandings.points > 5" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( results.fastestlapspeed ) from races join results on races.raceid = results.raceid where races.year = 2008 and races.name = 'Monaco Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average fastest lap speed for the Monaco Grand Prix in 2008? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( results.fastestlapspeed ) from races join results on races.raceid = results.raceid where races.year = 2008 and races.name = 'Monaco Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( results.fastestlapspeed ) from races join results on races.raceid = results.raceid where races.year = 2008 and races.name = 'Monaco Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum fastest lap speed in the Monaco Grand Prix in 2008? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( results.fastestlapspeed ) from races join results on races.raceid = results.raceid where races.year = 2008 and races.name = 'Monaco Grand Prix'" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect max ( _ ) , _ from _ where _ group by _ order by _ asc | select max ( results.fastestlapspeed ) , races.name , races.year from races join results on races.raceid = results.raceid where races.year > 2014 group by races.name order by races.year asc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect max ( _ ) , _ from _ where _ group by _ order by _ asc | select max ( results.fastestlapspeed ) , races.name , races.year from races join results on races.raceid = results.raceid where races.year > 2014 group by races.name order by races.year asc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ group by _ order by _ asc | select avg ( results.fastestlapspeed ) , races.name , races.year from races join results on races.raceid = results.raceid where races.year > 2014 group by races.name order by races.year asc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average fastest lap speed for races held after 2004, for each race, ordered by year? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ group by _ order by _ asc | select avg ( results.fastestlapspeed ) , races.name , races.year from races join results on races.raceid = results.raceid where races.year > 2014 group by races.name order by races.year asc" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id, forename and number of races of all drivers who have at least participated in two races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) >= _ | select drivers.driverid , drivers.forename , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) >= 2" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id, forename, and number of races for all drivers that have participated in at least 2 races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) >= _ | select drivers.driverid , drivers.forename , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) >= 2" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the driver id and number of races of all drivers who have at most participated in 30 races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) <= _ | select drivers.driverid , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) <= 30" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each id of a driver who participated in at most 30 races, how many races did they participate in? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) <= _ | select drivers.driverid , count ( * ) from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid having count ( * ) <= 30" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and surname of the driver who participated the most number of races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select drivers.driverid , drivers.surname from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid order by count ( * ) desc limit 1" }, { "db_id": "formula_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and last names of all drivers who participated in the most races? | circuits : circuitid , circuitref , name , location , country , lat , lng , alt , url | races : raceid , year , round , circuitid , name , date , time , url | drivers : driverid , driverref , number , code , forename , surname , dob , nationality , url | status : statusid , status | seasons : year , url | constructors : constructorid , constructorref , name , nationality , url | constructorstandings : constructorstandingsid , raceid , constructorid , points , position , positiontext , wins | results : resultid , raceid , driverid , constructorid , number , grid , position , positiontext , positionorder , points , laps , time , milliseconds , fastestlap , rank , fastestlaptime , fastestlapspeed , statusid | driverstandings : driverstandingsid , raceid , driverid , points , position , positiontext , wins | constructorresults : constructorresultsid , raceid , constructorid , points , status | qualifying : qualifyid , raceid , driverid , constructorid , number , position , q1 , q2 , q3 | pitstops : raceid , driverid , stop , lap , time , duration , milliseconds | laptimes : raceid , driverid , lap , position , time , milliseconds | races.circuitid = circuits.circuitid | constructorstandings.raceid = races.raceid | constructorstandings.constructorid = constructors.constructorid | results.driverid = drivers.driverid | results.raceid = races.raceid | results.constructorid = constructors.constructorid | driverstandings.driverid = drivers.driverid | driverstandings.raceid = races.raceid | constructorresults.raceid = races.raceid | constructorresults.constructorid = constructors.constructorid | qualifying.driverid = drivers.driverid | qualifying.raceid = races.raceid | qualifying.constructorid = constructors.constructorid | pitstops.driverid = drivers.driverid | pitstops.raceid = races.raceid | laptimes.driverid = drivers.driverid | laptimes.raceid = races.raceid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select drivers.driverid , drivers.surname from drivers join results on drivers.driverid = results.driverid join races on results.raceid = races.raceid group by drivers.driverid order by count ( * ) desc limit 1" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many technicians are there? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from technician" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of technicians? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from technician" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of technicians in ascending order of age. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from technician order by age asc" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the technicians by ascending order of age? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from technician order by age asc" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the team and starting year of technicians? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ | select team , starting_year from technician" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the team and starting year for each technician? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ | select team , starting_year from technician" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of technicians whose team is not \"NYY\". | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ | select name from technician where team != 'NYY'" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the technician whose team is not 'NYY'? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ | select name from technician where team != 'NYY'" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of technicians aged either 36 or 37 | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ | select name from technician where age = 36 or age = 37" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the technicians aged either 36 or 37? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ | select name from technician where age = 36 or age = 37" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the starting year of the oldest technicians? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select starting_year from technician order by age desc limit 1" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the starting year for the oldest technician? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select starting_year from technician order by age desc limit 1" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different teams of technicians and the number of technicians in each team. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select team , count ( * ) from technician group by team" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each team, how many technicians are there? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select team , count ( * ) from technician group by team" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the team that has the most number of technicians. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select team from technician group by team order by count ( * ) desc limit 1" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the teams with the most technicians? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select team from technician group by team order by count ( * ) desc limit 1" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the team that have at least two technicians. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select team from technician group by team having count ( * ) >= 2" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the team with at least 2 technicians? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select team from technician group by team having count ( * ) >= 2" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of technicians and series of machines they are assigned to repair. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ | select technician.name , machine.machine_series from repair_assignment join machine on repair_assignment.machine_id = machine.machine_id join technician on repair_assignment.technician_id = technician.technician_id" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of technicians and the machine series that they repair? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ | select technician.name , machine.machine_series from repair_assignment join machine on repair_assignment.machine_id = machine.machine_id join technician on repair_assignment.technician_id = technician.technician_id" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of technicians in ascending order of quality rank of the machine they are assigned. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select technician.name from repair_assignment join machine on repair_assignment.machine_id = machine.machine_id join technician on repair_assignment.technician_id = technician.technician_id order by machine.quality_rank asc" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the technicians by ascending order of quality rank for the machine they are assigned? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select technician.name from repair_assignment join machine on repair_assignment.machine_id = machine.machine_id join technician on repair_assignment.technician_id = technician.technician_id order by machine.quality_rank asc" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of technicians who are assigned to repair machines with value point more than 70. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ | select technician.name from repair_assignment join machine on repair_assignment.machine_id = machine.machine_id join technician on repair_assignment.technician_id = technician.technician_id where machine.value_points > 70" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the technicians that are assigned to repair machines with more point values than 70? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ | select technician.name from repair_assignment join machine on repair_assignment.machine_id = machine.machine_id join technician on repair_assignment.technician_id = technician.technician_id where machine.value_points > 70" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of technicians and the number of machines they are assigned to repair. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select technician.name , count ( * ) from repair_assignment join technician on repair_assignment.technician_id = technician.technician_id group by technician.name" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the technicians and how many machines are they assigned to repair? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select technician.name , count ( * ) from repair_assignment join technician on repair_assignment.technician_id = technician.technician_id group by technician.name" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of technicians who have not been assigned to repair machines. | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from technician where technician_id not in ( select technician_id from repair_assignment )" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the technicians that have not been assigned to repair machines? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from technician where technician_id not in ( select technician_id from repair_assignment )" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the starting years shared by technicians from team \"CLE\" and \"CWS\". | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select starting_year from technician where team = 'CLE' intersect select starting_year from technician where team = 'CWS'" }, { "db_id": "machine_repair", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"? | repair : repair_id , name , launch_date , notes | machine : machine_id , making_year , class , team , machine_series , value_points , quality_rank | technician : technician_id , name , team , starting_year , age | repair_assignment : technician_id , repair_id , machine_id | repair_assignment.machine_id = machine.machine_id | repair_assignment.repair_id = repair.repair_id | repair_assignment.technician_id = technician.technician_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select starting_year from technician where team = 'CLE' intersect select starting_year from technician where team = 'CWS'" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many entrepreneurs are there? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of entrepreneurs. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the companies of entrepreneurs in descending order of money requested. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select company from entrepreneur order by money_requested desc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the companies of entrepreneurs, ordered descending by amount of money requested? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select company from entrepreneur order by money_requested desc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the companies and the investors of entrepreneurs. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select company , investor from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the companies and investors that correspond to each entrepreneur? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select company , investor from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average money requested by all entrepreneurs? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( money_requested ) from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average money requested across all entrepreneurs. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( money_requested ) from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of people in ascending order of weight? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from people order by weight asc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of people, ordered by weight ascending. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from people order by weight asc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of entrepreneurs? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select people.name from entrepreneur join people on entrepreneur.people_id = people.people_id" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of entrepreneurs. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select people.name from entrepreneur join people on entrepreneur.people_id = people.people_id" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of entrepreneurs whose investor is not \"Rachel Elnaugh\"? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from entrepreneur join people on entrepreneur.people_id = people.people_id where entrepreneur.investor != 'Rachel Elnaugh'" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of entrepreneurs do no not have the investor Rachel Elnaugh. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from entrepreneur join people on entrepreneur.people_id = people.people_id where entrepreneur.investor != 'Rachel Elnaugh'" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the weight of the shortest person? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select weight from people order by height asc limit 1" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the weight of the shortest person. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select weight from people order by height asc limit 1" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the entrepreneur with the greatest weight? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select people.name from entrepreneur join people on entrepreneur.people_id = people.people_id order by people.weight desc limit 1" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the heaviest entrepreneur. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select people.name from entrepreneur join people on entrepreneur.people_id = people.people_id order by people.weight desc limit 1" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total money requested by entrepreneurs with height more than 1.85? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( entrepreneur.money_requested ) from entrepreneur join people on entrepreneur.people_id = people.people_id where people.height > 1.85" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the total money requested by entrepreneurs who are taller than 1.85. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( entrepreneur.money_requested ) from entrepreneur join people on entrepreneur.people_id = people.people_id where people.height > 1.85" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of birth of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.date_of_birth from entrepreneur join people on entrepreneur.people_id = people.people_id where entrepreneur.investor = 'Simon Woodroffe' or entrepreneur.investor = 'Peter Jones'" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.date_of_birth from entrepreneur join people on entrepreneur.people_id = people.people_id where entrepreneur.investor = 'Simon Woodroffe' or entrepreneur.investor = 'Peter Jones'" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the weights of entrepreneurs in descending order of money requested? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select people.weight from entrepreneur join people on entrepreneur.people_id = people.people_id order by entrepreneur.money_requested desc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the weights of entrepreneurs, ordered descending by amount of money requested. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select people.weight from entrepreneur join people on entrepreneur.people_id = people.people_id order by entrepreneur.money_requested desc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select investor , count ( * ) from entrepreneur group by investor" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many entrepreneurs correspond to each investor? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select investor , count ( * ) from entrepreneur group by investor" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the investor that has invested in the most number of entrepreneurs? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select investor from entrepreneur group by investor order by count ( * ) desc limit 1" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the investor who have invested in the greatest number of entrepreneurs. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select investor from entrepreneur group by investor order by count ( * ) desc limit 1" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the investors that have invested in at least two entrepreneurs? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select investor from entrepreneur group by investor having count ( * ) >= 2" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the investors who have invested in two or more entrepreneurs. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select investor from entrepreneur group by investor having count ( * ) >= 2" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of entrepreneurs and their companies in descending order of money requested? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select people.name , entrepreneur.company from entrepreneur join people on entrepreneur.people_id = people.people_id order by entrepreneur.money_requested asc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select people.name , entrepreneur.company from entrepreneur join people on entrepreneur.people_id = people.people_id order by entrepreneur.money_requested asc" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of people that are not entrepreneurs. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select people_id from entrepreneur )" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of people who are not entrepreneurs? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select people_id from entrepreneur )" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select investor from entrepreneur where money_requested > 140000 intersect select investor from entrepreneur where money_requested < 120000" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select investor from entrepreneur where money_requested > 140000 intersect select investor from entrepreneur where money_requested < 120000" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct companies are there? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct company ) from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different companies. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct company ) from entrepreneur" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the company of the tallest entrepreneur. | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select entrepreneur.company from entrepreneur join people on entrepreneur.people_id = people.people_id order by people.height desc limit 1" }, { "db_id": "entrepreneur", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which company was started by the entrepreneur with the greatest height? | entrepreneur : entrepreneur_id , people_id , company , money_requested , investor | people : people_id , name , height , weight , date_of_birth | entrepreneur.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select entrepreneur.company from entrepreneur join people on entrepreneur.people_id = people.people_id order by people.height desc limit 1" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many perpetrators are there? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from perpetrator" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the date of perpetrators in descending order of the number of people killed. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select date from perpetrator order by killed desc" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the number of people injured by perpetrators in ascending order. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select injured from perpetrator order by injured asc" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of people injured by all perpetrators? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( injured ) from perpetrator" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location of the perpetrator with the largest kills. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select location from perpetrator order by killed desc limit 1" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of people in ascending order of height? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from people order by height asc" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of perpetrators? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select people.name from people join perpetrator on people.people_id = perpetrator.people_id" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of perpetrators whose country is not \"China\"? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from people join perpetrator on people.people_id = perpetrator.people_id where perpetrator.country != 'China'" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the perpetrator with the biggest weight. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select people.name from people join perpetrator on people.people_id = perpetrator.people_id order by people.weight desc limit 1" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total kills of the perpetrators with height more than 1.84. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( perpetrator.killed ) from people join perpetrator on people.people_id = perpetrator.people_id where people.height > 1.84" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of perpetrators in country \"China\" or \"Japan\"? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from people join perpetrator on people.people_id = perpetrator.people_id where perpetrator.country = 'China' or perpetrator.country = 'Japan'" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the heights of perpetrators in descending order of the number of people they injured? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select people.height from people join perpetrator on people.people_id = perpetrator.people_id order by perpetrator.injured desc" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country , count ( * ) from perpetrator group by country" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the country that has the most perpetrators? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select country , count ( * ) from perpetrator group by country order by count ( * ) desc limit 1" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries that have at least two perpetrators? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) >= _ | select country , count ( * ) from perpetrator group by country having count ( * ) >= 2" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of perpetrators in descending order of the year. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select people.name from people join perpetrator on people.people_id = perpetrator.people_id order by perpetrator.year desc" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of people that are not perpetrators. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select people_id from perpetrator )" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country from perpetrator where injured > 50 intersect select country from perpetrator where injured < 20" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct locations of perpetrators are there? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct location ) from perpetrator" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the date of the tallest perpetrator. | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select perpetrator.date from people join perpetrator on people.people_id = perpetrator.people_id order by people.height desc limit 1" }, { "db_id": "perpetrator", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which year did the most recent crime happen? | perpetrator : perpetrator_id , people_id , date , year , location , country , killed , injured | people : people_id , name , height , weight , home town | perpetrator.people_id = people.people_id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( year ) from perpetrator" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the name of all campuses in Los Angeles county. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where county = 'Los Angeles'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campuses are located in the county of Los Angeles? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where county = 'Los Angeles'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all campuses located at Chico? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where location = 'Chico'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campuses are located in Chico? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where location = 'Chico'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the campuses opened in 1958. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where year = 1958" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the campuses that opened in 1958? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where year = 1958" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the campuses opened before 1800. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where year < 1800" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campuses opened before 1800? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where year < 1800" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which campus was opened between 1935 and 1939? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where year >= 1935 and year <= 1939" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campuses opened between 1935 and 1939? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where year >= 1935 and year <= 1939" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select campus from campuses where location = 'Northridge' and county = 'Los Angeles' union select campus from campuses where location = 'San Francisco' and county = 'San Francisco'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select campus from campuses where location = 'Northridge' and county = 'Los Angeles' union select campus from campuses where location = 'San Francisco' and county = 'San Francisco'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the campus fee of \"San Jose State University\" in year 1996? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campusfee from campuses join csu_fees on campuses.id = csu_fees.campus where campuses.campus = 'San Jose State University' and csu_fees.year = 1996" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the campus fee for San Jose State University in 1996? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campusfee from campuses join csu_fees on campuses.id = csu_fees.campus where campuses.campus = 'San Jose State University' and csu_fees.year = 1996" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the campus fee of \"San Francisco State University\" in year 1996? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campusfee from campuses join csu_fees on campuses.id = csu_fees.campus where campuses.campus = 'San Francisco State University' and csu_fees.year = 1996" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the campus fee for San Francisco State University in 1996? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campusfee from campuses join csu_fees on campuses.id = csu_fees.campus where campuses.campus = 'San Francisco State University' and csu_fees.year = 1996" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the count of universities whose campus fee is greater than the average campus fee. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from csu_fees where campusfee > ( select avg ( campusfee ) from csu_fees )" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many universities have a campus fee higher than average? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from csu_fees where campusfee > ( select avg ( campusfee ) from csu_fees )" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the count of universities whose campus fee is greater than the average campus fee. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from csu_fees where campusfee > ( select avg ( campusfee ) from csu_fees )" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many universities have a campus fee greater than the average? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from csu_fees where campusfee > ( select avg ( campusfee ) from csu_fees )" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which university is in Los Angeles county and opened after 1950? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where county = 'Los Angeles' and year > 1950" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campuses are located in Los Angeles county and opened after 1950? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where county = 'Los Angeles' and year > 1950" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which year has the most degrees conferred? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select year from degrees group by year order by sum ( degrees ) desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In what year was the most degrees conferred? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select year from degrees group by year order by sum ( degrees ) desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which campus has the most degrees conferred in all times? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select campus from degrees group by campus order by sum ( degrees ) desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campus has the most degrees conferrred over its entire existence? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select campus from degrees group by campus order by sum ( degrees ) desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which campus has the most faculties in year 2003? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select campuses.campus from campuses join faculty on campuses.id = faculty.campus where faculty.year = 2003 order by faculty.faculty desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campus has the most faculties in 2003? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select campuses.campus from campuses join faculty on campuses.id = faculty.campus where faculty.year = 2003 order by faculty.faculty desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average fee on a CSU campus in 1996 | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( campusfee ) from csu_fees where year = 1996" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average fee for a CSU campus in the year of 1996? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( campusfee ) from csu_fees where year = 1996" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average fee on a CSU campus in 2005? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( campusfee ) from csu_fees where year = 2005" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average fee for a CSU campus in the year of 2005? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( campusfee ) from csu_fees where year = 2005" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: report the total number of degrees granted between 1998 and 2002. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ where _ group by _ | select campuses.campus , sum ( degrees.degrees ) from campuses join degrees on campuses.id = degrees.campus where degrees.year >= 1998 and degrees.year <= 2002 group by campuses.campus" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many degrees were conferred between 1998 and 2002? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ where _ group by _ | select campuses.campus , sum ( degrees.degrees ) from campuses join degrees on campuses.id = degrees.campus where degrees.year >= 1998 and degrees.year <= 2002 group by campuses.campus" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each Orange county campus, report the number of degrees granted after 2000. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ where _ group by _ | select campuses.campus , sum ( degrees.degrees ) from campuses join degrees on campuses.id = degrees.campus where campuses.county = 'Orange' and degrees.year >= 2000 group by campuses.campus" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of degrees granted after 2000 for each Orange county campus? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ where _ group by _ | select campuses.campus , sum ( degrees.degrees ) from campuses join degrees on campuses.id = degrees.campus where campuses.county = 'Orange' and degrees.year >= 2000 group by campuses.campus" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the campus which has more faculties in 2002 than every campus in Orange county. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select campuses.campus from campuses join faculty on campuses.id = faculty.campus where faculty.year = 2002 and faculty > ( select max ( faculty ) from campuses join faculty on campuses.id = faculty.campus where faculty.year = 2002 and campuses.county = 'Orange' )" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select campuses.campus from campuses join faculty on campuses.id = faculty.campus where faculty.year = 2002 and faculty > ( select max ( faculty ) from campuses join faculty on campuses.id = faculty.campus where faculty.year = 2002 and campuses.county = 'Orange' )" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campuses.campus from campuses join enrollments on campuses.id = enrollments.campus where enrollments.year = 1956 and totalenrollment_ay > 400 and fte_ay > 200" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campuses.campus from campuses join enrollments on campuses.id = enrollments.campus where enrollments.year = 1956 and totalenrollment_ay > 400 and fte_ay > 200" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many campuses are there in Los Angeles county? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from campuses where county = 'Los Angeles'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many campuses exist are in the county of LA? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from campuses where county = 'Los Angeles'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the campuses in Los Angeles county. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where county = 'Los Angeles'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What campuses are in Los Angeles county? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campus from campuses where county = 'Los Angeles'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many degrees were conferred in \"San Jose State University\" in 2000? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select degrees from campuses join degrees on campuses.id = degrees.campus where campuses.campus = 'San Jose State University' and degrees.year = 2000" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many degrees were conferred at San Jose State University in 2000? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select degrees from campuses join degrees on campuses.id = degrees.campus where campuses.campus = 'San Jose State University' and degrees.year = 2000" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the degrees conferred in \"San Francisco State University\" in 2001. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select degrees from campuses join degrees on campuses.id = degrees.campus where campuses.campus = 'San Francisco State University' and degrees.year = 2001" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What degrees were conferred in San Francisco State University in the year 2001? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select degrees from campuses join degrees on campuses.id = degrees.campus where campuses.campus = 'San Francisco State University' and degrees.year = 2001" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty is there in total in the year of 2002? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( faculty ) from faculty where year = 2002" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty, in total, are there in the year 2002? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( faculty ) from faculty where year = 2002" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of faculty lines in campus \"Long Beach State University\" in 2002? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select faculty from faculty join campuses on faculty.campus = campuses.id where faculty.year = 2002 and campuses.campus = 'Long Beach State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of faculty at Long Beach State University in 2002? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select faculty from faculty join campuses on faculty.campus = campuses.id where faculty.year = 2002 and campuses.campus = 'Long Beach State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty lines are there in \"San Francisco State University\" in year 2004? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select faculty from faculty join campuses on faculty.campus = campuses.id where faculty.year = 2004 and campuses.campus = 'San Francisco State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty lines are there at San Francisco State University in 2004? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select faculty from faculty join campuses on faculty.campus = campuses.id where faculty.year = 2004 and campuses.campus = 'San Francisco State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the campus that have between 600 and 1000 faculty lines in year 2004. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campuses.campus from campuses join faculty on campuses.id = faculty.campus where faculty.faculty >= 600 and faculty.faculty <= 1000 and campuses.year = 2004" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the campuses that had between 600 and 1000 faculty members in 2004? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select campuses.campus from campuses join faculty on campuses.id = faculty.campus where faculty.faculty >= 600 and faculty.faculty <= 1000 and campuses.year = 2004" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty lines are there in the university that conferred the most number of degrees in year 2002? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select faculty.faculty from campuses join faculty on campuses.id = faculty.campus join degrees on campuses.id = degrees.campus and faculty.year = degrees.year where faculty.year = 2002 order by degrees.degrees desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty members did the university that conferred the most degrees in 2002 have? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select faculty.faculty from campuses join faculty on campuses.id = faculty.campus join degrees on campuses.id = degrees.campus and faculty.year = degrees.year where faculty.year = 2002 order by degrees.degrees desc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty lines are there in the university that conferred the least number of degrees in year 2001? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc limit _ | select faculty.faculty from campuses join faculty on campuses.id = faculty.campus join degrees on campuses.id = degrees.campus and faculty.year = degrees.year where faculty.year = 2001 order by degrees.degrees asc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty members are at the university that gave the least number of degrees in 2001? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc limit _ | select faculty.faculty from campuses join faculty on campuses.id = faculty.campus join degrees on campuses.id = degrees.campus and faculty.year = degrees.year where faculty.year = 2001 order by degrees.degrees asc limit 1" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many undergraduates are there in \"San Jose State University\" in year 2004? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( discipline_enrollments.undergraduate ) from discipline_enrollments join campuses on discipline_enrollments.campus = campuses.id where discipline_enrollments.year = 2004 and campuses.campus = 'San Jose State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many undergraduates are there at San Jose State | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( discipline_enrollments.undergraduate ) from discipline_enrollments join campuses on discipline_enrollments.campus = campuses.id where discipline_enrollments.year = 2004 and campuses.campus = 'San Jose State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of graduates in \"San Francisco State University\" in year 2004? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( discipline_enrollments.graduate ) from discipline_enrollments join campuses on discipline_enrollments.campus = campuses.id where discipline_enrollments.year = 2004 and campuses.campus = 'San Francisco State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many people graduated from San Francisco State University in 2004? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( discipline_enrollments.graduate ) from discipline_enrollments join campuses on discipline_enrollments.campus = campuses.id where discipline_enrollments.year = 2004 and campuses.campus = 'San Francisco State University'" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the campus fee of \"San Francisco State University\" in year 2000? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select csu_fees.campusfee from csu_fees join campuses on csu_fees.campus = campuses.id where campuses.campus = 'San Francisco State University' and csu_fees.year = 2000" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In the year 2000, what is the campus fee for San Francisco State University? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select csu_fees.campusfee from csu_fees join campuses on csu_fees.campus = campuses.id where campuses.campus = 'San Francisco State University' and csu_fees.year = 2000" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the campus fee of \"San Jose State University\" in year 2000. | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select csu_fees.campusfee from csu_fees join campuses on csu_fees.campus = campuses.id where campuses.campus = 'San Jose State University' and csu_fees.year = 2000" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the campus fee in the year 2000 for San Jose State University? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect _ from _ where _ | select csu_fees.campusfee from csu_fees join campuses on csu_fees.campus = campuses.id where campuses.campus = 'San Jose State University' and csu_fees.year = 2000" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many CSU campuses are there? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from campuses" }, { "db_id": "csu_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of campuses? | campuses : id , campus , location , county , year | csu_fees : campus , year , campusfee | degrees : year , campus , degrees | discipline_enrollments : campus , discipline , year , undergraduate , graduate | enrollments : campus , year , totalenrollment_ay , fte_ay | faculty : campus , year , faculty | csu_fees.campus = campuses.id | degrees.campus = campuses.id | discipline_enrollments.campus = campuses.id | enrollments.campus = campuses.id | faculty.campus = campuses.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from campuses" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many candidates are there? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from candidate" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of candidates. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from candidate" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which poll resource provided the most number of candidate information? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select poll_source from candidate group by poll_source order by count ( * ) desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the poll resource associated with the most candidates. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select poll_source from candidate group by poll_source order by count ( * ) desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the top 3 highest support rates? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select support_rate from candidate order by support_rate desc limit 3" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the top 3 greatest support rates. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select support_rate from candidate order by support_rate desc limit 3" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the candidate who got the lowest oppose rate. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select candidate_id from candidate order by oppose_rate asc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the candidate with the lowest oppose rate? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select candidate_id from candidate order by oppose_rate asc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select support_rate , consider_rate , oppose_rate from candidate order by unsure_rate asc" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select support_rate , consider_rate , oppose_rate from candidate order by unsure_rate asc" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: which poll source does the highest oppose rate come from? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select poll_source from candidate order by oppose_rate desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the poll source corresponding to the candidate who has the oppose rate. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select poll_source from candidate order by oppose_rate desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all people names in the order of their date of birth from old to young. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from people order by date_of_birth asc" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all people, ordered by their date of birth? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from people order by date_of_birth asc" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average height and weight for all males (sex is M). | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( height ) , avg ( weight ) from people where sex = 'M'" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average height and weight across males (sex is M)? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( height ) , avg ( weight ) from people where sex = 'M'" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the names of people who are taller than 200 or lower than 190. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select name from people where height > 200 or height < 190" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of people who have a height greater than 200 or less than 190? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select name from people where height > 200 or height < 190" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average and minimum weight for each gender. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , _ from _ group by _ | select avg ( weight ) , min ( weight ) , sex from people group by sex" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average and minimum weights for people of each sex? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , _ from _ group by _ | select avg ( weight ) , min ( weight ) , sex from people group by sex" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and gender of the candidate who got the highest support rate. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select people.name , people.sex from people join candidate on people.people_id = candidate.people_id order by candidate.support_rate desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and sex of the candidate with the highest support rate? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select people.name , people.sex from people join candidate on people.people_id = candidate.people_id order by candidate.support_rate desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the candidates whose oppose percentage is the lowest for each sex. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select people.name , people.sex , min ( oppose_rate ) from people join candidate on people.people_id = candidate.people_id group by people.sex" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each sex, what is the name and sex of the candidate with the oppose rate for their sex? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select people.name , people.sex , min ( oppose_rate ) from people join candidate on people.people_id = candidate.people_id group by people.sex" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: which gender got the highest average uncertain ratio. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select people.sex from people join candidate on people.people_id = candidate.people_id group by people.sex order by avg ( candidate.unsure_rate ) desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the sex of the candidate who had the highest unsure rate? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select people.sex from people join candidate on people.people_id = candidate.people_id group by people.sex order by avg ( candidate.unsure_rate ) desc limit 1" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the names of people who did not participate in the candidate election. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select people_id from candidate )" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names of people who did not participate in the candidate election. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select people_id from candidate )" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the candidates whose support percentage is lower than their oppose rate. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from people join candidate on people.people_id = candidate.people_id where candidate.support_rate < candidate.oppose_rate" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of candidates who have a lower support rate than oppose rate? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from people join candidate on people.people_id = candidate.people_id where candidate.support_rate < candidate.oppose_rate" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many people are there whose weight is higher than 85 for each gender? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , sex from people where weight > 85 group by sex" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of people of each sex who have a weight higher than 85. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , sex from people where weight > 85 group by sex" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the highest support percentage, lowest consider rate and oppose rate of all candidates. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , min ( _ ) from _ | select max ( support_rate ) , min ( consider_rate ) , min ( oppose_rate ) from candidate" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , min ( _ ) from _ | select max ( support_rate ) , min ( consider_rate ) , min ( oppose_rate ) from candidate" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list all female (sex is F) candidate names in the alphabetical order. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select people.name from people join candidate on people.people_id = candidate.people_id where people.sex = 'F' order by people.name asc" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all female candidates in alphabetical order (sex is F)? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select people.name from people join candidate on people.people_id = candidate.people_id where people.sex = 'F' order by people.name asc" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the name of people whose height is lower than the average. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select name from people where height < ( select avg ( height ) from people )" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of people who are shorter than average? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select name from people where height < ( select avg ( height ) from people )" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all info about all people. | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select * from people" }, { "db_id": "candidate_poll", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about all people? | candidate : candidate_id , people_id , poll_source , date , support_rate , consider_rate , oppose_rate , unsure_rate | people : people_id , sex , name , date_of_birth , height , weight | candidate.people_id = people.people_id | \n\n### Response:\n\nselect _ from _ | select * from people" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of all movies directed by steven spielberg. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select title from movie where director = 'Steven Spielberg'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all movies directed by Steven Spielberg? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select title from movie where director = 'Steven Spielberg'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the movie produced after 2000 and directed by James Cameron? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select title from movie where director = 'James Cameron' and year > 2000" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all movies that James Cameron directed after 2000? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select title from movie where director = 'James Cameron' and year > 2000" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many movies were made before 2000? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from movie where year < 2000" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many movies were made before 2000? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from movie where year < 2000" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the director of movie Avatar? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select director from movie where title = 'Avatar'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who directed Avatar? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select director from movie where title = 'Avatar'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many reviewers listed? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from reviewer" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many reviewers are there? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from reviewer" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the reviewer whose name has substring 'Mike'? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ like _ | select rid from reviewer where name like '%Mike%'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the reviewer whose name includes the word \"Mike\"? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ like _ | select rid from reviewer where name like '%Mike%'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the reviewer id of Daniel Lewis? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select rid from reviewer where name = 'Daniel Lewis'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the reviewer named Daniel Lewis? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select rid from reviewer where name = 'Daniel Lewis'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of ratings that has more than 3 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from rating where stars > 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many movie ratings have more than 3 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from rating where stars > 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the lowest and highest rating star? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( stars ) , min ( stars ) from rating" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum and mininum number of stars a rating can receive? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( stars ) , min ( stars ) from rating" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ order by _ asc | select distinct year from movie join rating on movie.mid = rating.mid where rating.stars >= 4 order by movie.year asc" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ order by _ asc | select distinct year from movie join rating on movie.mid = rating.mid where rating.stars >= 4 order by movie.year asc" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of directors who directed movies with 5 star rating? Also return the title of these movies. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select movie.director , movie.title from movie join rating on movie.mid = rating.mid where rating.stars = 5" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select movie.director , movie.title from movie join rating on movie.mid = rating.mid where rating.stars = 5" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average rating star for each reviewer? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select reviewer.name , avg ( rating.stars ) from rating join reviewer on rating.rid = reviewer.rid group by reviewer.name" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of stars that each reviewer awards for a movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select reviewer.name , avg ( rating.stars ) from rating join reviewer on rating.rid = reviewer.rid group by reviewer.name" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of all movies that have no ratings. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from movie where mid not in ( select mid from rating )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all movies that have not been rated? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from movie where mid not in ( select mid from rating )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all reviewers who have ratings with a NULL value for the date. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct name from reviewer join rating on reviewer.rid = rating.rid where ratingdate = 'null'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of all reviewers whose ratings do not have a date field? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct name from reviewer join rating on reviewer.rid = rating.rid where ratingdate = 'null'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average rating stars and title for the oldest movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ = ( select min ( _ ) from _ ) | select avg ( rating.stars ) , movie.title from rating join movie on rating.mid = movie.mid where movie.year = ( select min ( year ) from movie )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For the oldest movie listed, what is its average rating and title? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ = ( select min ( _ ) from _ ) | select avg ( rating.stars ) , movie.title from rating join movie on rating.mid = movie.mid where movie.year = ( select min ( year ) from movie )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the most recent movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select title from movie where year = ( select max ( year ) from movie )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of the newest movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select title from movie where year = ( select max ( year ) from movie )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum stars and year for the most recent movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect max ( _ ) , _ from _ where _ = ( select max ( _ ) from _ ) | select max ( rating.stars ) , movie.year from rating join movie on rating.mid = movie.mid where movie.year = ( select max ( year ) from movie )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is highest rating for the most recent movie and when was it released? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect max ( _ ) , _ from _ where _ = ( select max ( _ ) from _ ) | select max ( rating.stars ) , movie.year from rating join movie on rating.mid = movie.mid where movie.year = ( select max ( year ) from movie )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the names of movies whose created year is after all movies directed by Steven Spielberg? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select title from movie where year > ( select max ( year ) from movie where director = 'Steven Spielberg' )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all movies that were created after the most recent Steven Spielberg film? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select title from movie where year > ( select max ( year ) from movie where director = 'Steven Spielberg' )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ where _ ) | select movie.title , movie.director from rating join movie on rating.mid = movie.mid where rating.stars > ( select avg ( rating.stars ) from rating join movie on rating.mid = movie.mid where movie.director = 'James Cameron' )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ where _ ) | select movie.title , movie.director from rating join movie on rating.mid = movie.mid where rating.stars > ( select avg ( rating.stars ) from rating join movie on rating.mid = movie.mid where movie.director = 'James Cameron' )" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select reviewer.name , movie.title , rating.stars , rating.ratingdate from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid order by reviewer.name asc , movie.title , rating.stars" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select reviewer.name , movie.title , rating.stars , rating.ratingdate from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid order by reviewer.name asc , movie.title , rating.stars" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all reviewers who have contributed three or more ratings. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid group by rating.rid having count ( * ) >= 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all reviewers that have rated 3 or more movies? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid group by rating.rid having count ( * ) >= 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all reviewers who rated Gone with the Wind. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct reviewer.name from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where movie.title = 'Gone with the Wind'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the different reviewers who rates Gone with the Wind? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct reviewer.name from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where movie.title = 'Gone with the Wind'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all directors whose movies are rated by Sarah Martinez. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct movie.director from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Sarah Martinez'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all directors whose movies have been reviewed by Sarah Martinez? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct movie.director from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Sarah Martinez'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct reviewer.name , movie.title , rating.stars from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where movie.director = reviewer.name" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct reviewer.name , movie.title , rating.stars from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where movie.director = reviewer.name" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all reviewer names and movie names together in a single list. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ union select _ from _ | select name from reviewer union select title from movie" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the reviewers and movie names? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ union select _ from _ | select name from reviewer union select title from movie" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of all movies not reviewed by Chris Jackson. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from movie except select movie.title from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Chris Jackson'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all movies that were not reviewed by Chris Jackson? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from movie except select movie.title from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Chris Jackson'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc , _ | select movie.title , movie.director from movie join movie on movie.director = movie.director where movie.title != movie.title order by movie.director asc , movie.title" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For all directors who have directed more than one movie, what movies have they directed and what are their names? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc , _ | select movie.title , movie.director from movie join movie on movie.director = movie.director where movie.title != movie.title order by movie.director asc , movie.title" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For directors who had more than one movie, return the titles and produced years of all movies directed by them. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select movie.title , movie.year from movie join movie on movie.director = movie.director where movie.title != movie.title" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each director who directed more than one movie, what are the titles and dates of release for all those movies? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select movie.title , movie.year from movie join movie on movie.director = movie.director where movie.title != movie.title" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the directors who made exactly one movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select director from movie group by director having count ( * ) = 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all directors who made one movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select director from movie group by director having count ( * ) = 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the directors who made exactly one movie excluding director NULL? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) = _ | select director from movie where director != 'null' group by director having count ( * ) = 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all directors who have made one movie except for the director named NULL? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) = _ | select director from movie where director != 'null' group by director having count ( * ) = 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many movie reviews does each director get? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , movie.director from movie join rating on movie.mid = rating.mid group by movie.director" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each director, how many reviews have they received? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , movie.director from movie join rating on movie.mid = rating.mid group by movie.director" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the movies with the highest average rating. Return the movie titles and average rating. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select movie.title , avg ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.mid order by avg ( rating.stars ) desc limit 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the movie titles with the highest average rating and what are those ratings? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select movie.title , avg ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.mid order by avg ( rating.stars ) desc limit 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the movie titles and average rating of the movies with the lowest average rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) asc limit _ | select movie.title , avg ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.mid order by avg ( rating.stars ) asc limit 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles and average ratings for all movies that have the lowest average rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) asc limit _ | select movie.title , avg ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.mid order by avg ( rating.stars ) asc limit 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and years of the movies that has the top 3 highest rating star? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select movie.title , movie.year from rating join movie on rating.mid = movie.mid order by rating.stars desc limit 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and years released for the movies with the top 3 highest ratings? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select movie.title , movie.year from rating join movie on rating.mid = movie.mid order by rating.stars desc limit 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , max ( _ ) from _ where _ group by _ | select movie.title , rating.stars , movie.director , max ( rating.stars ) from rating join movie on rating.mid = movie.mid where director != 'null' group by director" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each director, what are the titles and ratings for all the movies they reviewed? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , max ( _ ) from _ where _ group by _ | select movie.title , rating.stars , movie.director , max ( rating.stars ) from rating join movie on rating.mid = movie.mid where director != 'null' group by director" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title and star rating of the movie that got the least rating star for each reviewer. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select movie.title , rating.rid , rating.stars , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.rid" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each reviewer id, what is the title and rating for the movie with the smallest rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select movie.title , rating.rid , rating.stars , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by rating.rid" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the title and score of the movie with the lowest rating among all movies directed by each director. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select movie.title , rating.stars , movie.director , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by movie.director" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each director, what is the title and score of their most poorly rated movie? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select movie.title , rating.stars , movie.director , min ( rating.stars ) from rating join movie on rating.mid = movie.mid group by movie.director" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the movie that is rated by most of times? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select movie.title , rating.mid from rating join movie on rating.mid = movie.mid group by rating.mid order by count ( * ) desc limit 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the movie that has been reviewed the most? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select movie.title , rating.mid from rating join movie on rating.mid = movie.mid group by rating.mid order by count ( * ) desc limit 1" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all movies that have rating star is between 3 and 5? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars between 3 and 5" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of all movies that have between 3 and 5 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars between 3 and 5" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of reviewers who had given higher than 3 star ratings. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars > 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the reviewers who have rated a movie more than 3 stars before? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars > 3" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average rating star for each movie that are not reviewed by Brittany Harris. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ where _ not in ( select _ from _ where _ ) group by _ | select mid , avg ( stars ) from rating where mid not in ( select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' ) group by mid" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average rating for each movie that has never been reviewed by Brittany Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ where _ not in ( select _ from _ where _ ) group by _ | select mid , avg ( stars ) from rating where mid not in ( select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' ) group by mid" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the movies that are not reviewed by Brittany Harris. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select mid from rating except select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all moviest hat have not been reviewed by Britanny Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select mid from rating except select rating.mid from rating join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris'" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average rating star for each movie that received at least 2 ratings. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ having count ( _ ) >= _ | select mid , avg ( stars ) from rating group by mid having count ( * ) >= 2" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each movie that received more than 3 reviews, what is the average rating? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ having count ( _ ) >= _ | select mid , avg ( stars ) from rating group by mid having count ( * ) >= 2" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the ids of reviewers who did not give 4 star. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select rid from rating except select rid from rating where stars = 4" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all reviewers who did not give 4 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select rid from rating except select rid from rating where stars = 4" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of reviewers who didn't only give 4 star. | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select rid from rating where stars != 4" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all reviewers who have not given 4 stars at least once? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select rid from rating where stars != 4" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are names of the movies that are either made after 2000 or reviewed by Brittany Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct movie.title from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' or movie.year > 2000" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all movies that were made after 2000 or reviewed by Brittany Harris? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct movie.title from rating join movie on rating.mid = movie.mid join reviewer on rating.rid = reviewer.rid where reviewer.name = 'Brittany Harris' or movie.year > 2000" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are names of the movies that are either made before 1980 or directed by James Cameron? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select title from movie where director = 'James Cameron' or year < 1980" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all movies made before 1980 or had James Cameron as the director? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ | select title from movie where director = 'James Cameron' or year < 1980" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of reviewers who had rated 3 star and 4 star? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 3 intersect select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 4" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all reviewers that have given 3 or 4 stars for reviews? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 3 intersect select reviewer.name from rating join reviewer on rating.rid = reviewer.rid where rating.stars = 4" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of movies that get 3 star and 4 star? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 3 intersect select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 4" }, { "db_id": "movie_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all movies that received 3 or 4 stars? | movie : mid , title , year , director | reviewer : rid , name | rating : rid , mid , stars , ratingdate | rating.rid = reviewer.rid | rating.mid = movie.mid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 3 intersect select movie.title from rating join movie on rating.mid = movie.mid where rating.stars = 4" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many counties are there? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from county_public_safety" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of countries. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from county_public_safety" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of counties in descending order of population. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from county_public_safety order by population desc" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the counties of public safety, ordered by population descending? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from county_public_safety order by population desc" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct police forces of counties whose location is not on east side. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct police_force from county_public_safety where location != 'East'" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different police forces of counties that are not located in the East? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct police_force from county_public_safety where location != 'East'" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the minimum and maximum crime rate of counties? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ | select min ( crime_rate ) , max ( crime_rate ) from county_public_safety" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the minimum and maximum crime rates across all counties. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ | select min ( crime_rate ) , max ( crime_rate ) from county_public_safety" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the crime rates of counties in ascending order of number of police officers. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select crime_rate from county_public_safety order by police_officers asc" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the crime rates of counties sorted by number of offices ascending? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select crime_rate from county_public_safety order by police_officers asc" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of cities in ascending alphabetical order? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from city order by name asc" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of cities, ordered alphabetically. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from city order by name asc" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the percentage of hispanics in cities with the black percentage higher than 10? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ | select hispanic from city where black > 10" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the hispanic percentage for cities in which the black percentage is greater than 10. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ | select hispanic from city where black > 10" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the county with the largest population. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from county_public_safety order by population desc limit 1" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the county with the greatest population? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from county_public_safety order by population desc limit 1" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of the city with the top 5 white percentages. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from city order by white desc limit 5" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the five cities with the greatest proportion of white people? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from city order by white desc limit 5" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of cities and names of counties they are in. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ | select city.name , county_public_safety.name from city join county_public_safety on city.county_id = county_public_safety.county_id" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of cities, as well as the names of the counties they correspond to? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ | select city.name , county_public_safety.name from city join county_public_safety on city.county_id = county_public_safety.county_id" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show white percentages of cities and the crime rates of counties they are in. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ | select city.white , county_public_safety.crime_rate from city join county_public_safety on city.county_id = county_public_safety.county_id" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ | select city.white , county_public_safety.crime_rate from city join county_public_safety on city.county_id = county_public_safety.county_id" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of cities in the county that has the largest number of police officers. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ order by _ desc limit _ ) | select name from city where county_id = ( select county_id from county_public_safety order by police_officers desc limit 1 )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of cities that are in the county with the most police officers? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ order by _ desc limit _ ) | select name from city where county_id = ( select county_id from county_public_safety order by police_officers desc limit 1 )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of cities in counties that have a population more than 20000. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ in ( select _ from _ where _ ) | select count ( * ) from city where county_id in ( select county_id from county_public_safety where population > 20000 )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many cities are in counties that have populations of over 20000? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ in ( select _ from _ where _ ) | select count ( * ) from city where county_id in ( select county_id from county_public_safety where population > 20000 )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the crime rate of counties with a city having white percentage more than 90. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ | select county_public_safety.crime_rate from city join county_public_safety on city.county_id = county_public_safety.county_id where city.white > 90" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the crime rates of counties that contain cities that have white percentages of over 90? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ | select county_public_safety.crime_rate from city join county_public_safety on city.county_id = county_public_safety.county_id where city.white > 90" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the police forces and the number of counties with each police force. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select police_force , count ( * ) from county_public_safety group by police_force" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many counties correspond to each police force? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select police_force , count ( * ) from county_public_safety group by police_force" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location shared by most counties? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select location from county_public_safety group by location order by count ( * ) desc limit 1" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which location has the most corresponding counties? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select location from county_public_safety group by location order by count ( * ) desc limit 1" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of counties that do not have any cities. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from county_public_safety where county_id not in ( select county_id from city )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of counties that do not contain any cities? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from county_public_safety where county_id not in ( select county_id from city )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the police force shared by counties with location on the east and west. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select police_force from county_public_safety where location = 'East' intersect select police_force from county_public_safety where location = 'West'" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which police forces operate in both counties that are located in the East and in the West? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select police_force from county_public_safety where location = 'East' intersect select police_force from county_public_safety where location = 'West'" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of cities in counties that have a crime rate less than 100. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select name from city where county_id in ( select county_id from county_public_safety where crime_rate < 100 )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of cities that are in counties that have a crime rate below 100? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select name from city where county_id in ( select county_id from county_public_safety where crime_rate < 100 )" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the case burden of counties in descending order of population. | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select case_burden from county_public_safety order by population desc" }, { "db_id": "county_public_safety", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the case burdens of counties, ordered descending by population? | county_public_safety : county_id , name , population , police_officers , residents_per_officer , case_burden , crime_rate , police_force , location | city : city_id , county_id , name , white , black , amerindian , asian , multiracial , hispanic | city.county_id = county_public_safety.county_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select case_burden from county_public_safety order by population desc" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all modern rooms with a base price below $160 and two beds. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname from rooms where baseprice < 160 and beds = 2 and decor = 'modern'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of modern rooms that have a base price lower than $160 and two beds. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname from rooms where baseprice < 160 and beds = 2 and decor = 'modern'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname , roomid from rooms where baseprice > 160 and maxoccupancy > 2" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname , roomid from rooms where baseprice > 160 and maxoccupancy > 2" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid group by reservations.room order by count ( * ) desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which room has the largest number of reservations? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid group by reservations.room order by count ( * ) desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many kids stay in the rooms reserved by ROY SWEAZY? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select kids from reservations where firstname = 'ROY' and lastname = 'SWEAZY'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select kids from reservations where firstname = 'ROY' and lastname = 'SWEAZY'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many times does ROY SWEAZY has reserved a room. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from reservations where firstname = 'ROY' and lastname = 'SWEAZY'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of times ROY SWEAZY has reserved a room. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from reservations where firstname = 'ROY' and lastname = 'SWEAZY'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which room has the highest rate? List the room's full name, rate, check in and check out date. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ order by _ desc limit _ | select rooms.roomname , reservations.rate , reservations.checkin , reservations.checkout from reservations join rooms on reservations.room = rooms.roomid group by reservations.room order by reservations.rate desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name, rate, check in and check out date for the room with the highest rate. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ order by _ desc limit _ | select rooms.roomname , reservations.rate , reservations.checkin , reservations.checkout from reservations join rooms on reservations.room = rooms.roomid group by reservations.room order by reservations.rate desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select adults from reservations where checkin = '2010-10-23' and firstname = 'CONRAD' and lastname = 'SELBIG'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select adults from reservations where checkin = '2010-10-23' and firstname = 'CONRAD' and lastname = 'SELBIG'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select kids from reservations where checkin = '2010-09-21' and firstname = 'DAMIEN' and lastname = 'TRACHSEL'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select kids from reservations where checkin = '2010-09-21' and firstname = 'DAMIEN' and lastname = 'TRACHSEL'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many king beds are there? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( beds ) from rooms where bedtype = 'King'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of king beds available. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( beds ) from rooms where bedtype = 'King'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and decor of rooms that have a king bed. Sort the list by their price. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select roomname , decor from rooms where bedtype = 'King' order by baseprice asc" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and decor of rooms with a king bed? Sort them by their price | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select roomname , decor from rooms where bedtype = 'King' order by baseprice asc" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which room has cheapest base price? List the room's name and the base price. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select roomname , baseprice from rooms order by baseprice asc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the room name and base price of the room with the lowest base price? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select roomname , baseprice from rooms order by baseprice asc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the decor of room Recluse and defiance? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select decor from rooms where roomname = 'Recluse and defiance'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the decor of the room named \"Recluse and defiance\". | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select decor from rooms where roomname = 'Recluse and defiance'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average base price of different bed type? List bed type and average base price. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select bedtype , avg ( baseprice ) from rooms group by bedtype" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each bed type, find the average base price of different bed type. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select bedtype , avg ( baseprice ) from rooms group by bedtype" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of people who could stay in the modern rooms in this inn? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( maxoccupancy ) from rooms where decor = 'modern'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many people in total can stay in the modern rooms of this inn? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( maxoccupancy ) from rooms where decor = 'modern'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What kind of decor has the least number of reservations? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select rooms.decor from reservations join rooms on reservations.room = rooms.roomid group by rooms.decor order by count ( rooms.decor ) asc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the least popular kind of decor? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select rooms.decor from reservations join rooms on reservations.room = rooms.roomid group by rooms.decor order by count ( rooms.decor ) asc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ + _ | select count ( * ) from reservations join rooms on reservations.room = rooms.roomid where rooms.maxoccupancy = reservations.adults + reservations.kids" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many times the number of adults and kids staying in a room reached the maximum capacity of the room? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ + _ | select count ( * ) from reservations join rooms on reservations.room = rooms.roomid where rooms.maxoccupancy = reservations.adults + reservations.kids" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last names of people who payed more than the rooms' base prices. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ - _ | select reservations.firstname , reservations.lastname from reservations join rooms on reservations.room = rooms.roomid where reservations.rate - rooms.baseprice > 0" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of people who payed more than the rooms' base prices? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ - _ | select reservations.firstname , reservations.lastname from reservations join rooms on reservations.room = rooms.roomid where reservations.rate - rooms.baseprice > 0" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms are there? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from rooms" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of rooms available in this inn? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from rooms" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms with a king bed. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from rooms where bedtype = 'King'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms have a king bed? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from rooms where bedtype = 'King'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms for each bed type. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select bedtype , count ( * ) from rooms group by bedtype" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the number of rooms for each bed type? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select bedtype , count ( * ) from rooms group by bedtype" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the room with the maximum occupancy. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select roomname from rooms order by maxoccupancy desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the room that can accommodate the most people? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select roomname from rooms order by maxoccupancy desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and name of the most expensive base price room. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select roomid , roomname from rooms order by baseprice desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which room has the highest base price? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select roomid , roomname from rooms order by baseprice desc limit 1" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the type of bed and name of all traditional rooms. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname , bedtype from rooms where decor = 'traditional'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the bed type and name of all the rooms with traditional decor? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname , bedtype from rooms where decor = 'traditional'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms with king bed for each decor type. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select decor , count ( * ) from rooms where bedtype = 'King' group by decor" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms have king beds? Report the number for each decor type. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select decor , count ( * ) from rooms where bedtype = 'King' group by decor" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average and minimum price of the rooms in different decor. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , avg ( _ ) , min ( _ ) from _ group by _ | select decor , avg ( baseprice ) , min ( baseprice ) from rooms group by decor" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average minimum and price of the rooms for each different decor. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , avg ( _ ) , min ( _ ) from _ group by _ | select decor , avg ( baseprice ) , min ( baseprice ) from rooms group by decor" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all rooms sorted by their prices. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ asc | select roomname from rooms order by baseprice asc" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort all the rooms according to the price. Just report the room names. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ asc | select roomname from rooms order by baseprice asc" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms with price higher than 120 for different decor. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select decor , count ( * ) from rooms where baseprice > 120 group by decor" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms cost more than 120, for each different decor? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select decor , count ( * ) from rooms where baseprice > 120 group by decor" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each bed type, find the average room price. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select bedtype , avg ( baseprice ) from rooms group by bedtype" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average base price of rooms, for each bed type? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select bedtype , avg ( baseprice ) from rooms group by bedtype" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of rooms with king or queen bed. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname from rooms where bedtype = 'King' or bedtype = 'Queen'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of rooms that have either king or queen bed? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ | select roomname from rooms where bedtype = 'King' or bedtype = 'Queen'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different types of beds are there? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct bedtype ) from rooms" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct bed types available in this inn. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct bedtype ) from rooms" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and id of the top 3 expensive rooms. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select roomid , roomname from rooms order by baseprice desc limit 3" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and id of the three highest priced rooms? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select roomid , roomname from rooms order by baseprice desc limit 3" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of rooms whose price is higher than the average price. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select roomname from rooms where baseprice > ( select avg ( baseprice ) from rooms )" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name of rooms that cost more than the average. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select roomname from rooms where baseprice > ( select avg ( baseprice ) from rooms )" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms that do not have any reservation. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select distinct _ from _ ) | select count ( * ) from rooms where roomid not in ( select distinct room from reservations )" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms have not had any reservation yet? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select distinct _ from _ ) | select count ( * ) from rooms where roomid not in ( select distinct room from reservations )" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name and number of reservations made for each of the rooms. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) , _ from _ group by _ | select rooms.roomname , count ( * ) , reservations.room from reservations join rooms on reservations.room = rooms.roomid group by reservations.room" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each room, find its name and the number of times reservations were made for it. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ , count ( _ ) , _ from _ group by _ | select rooms.roomname , count ( * ) , reservations.room from reservations join rooms on reservations.room = rooms.roomid group by reservations.room" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of rooms that have been reserved for more than 60 times. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid group by reservations.room having count ( * ) > 60" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of rooms whose reservation frequency exceeds 60 times? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid group by reservations.room having count ( * ) > 60" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of rooms whose base price is between 120 and 150. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select roomname from rooms where baseprice between 120 and 150" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which rooms cost between 120 and 150? Give me the room names. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select roomname from rooms where baseprice between 120 and 150" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of rooms booked by some customers whose first name contains ROY. | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ like _ | select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid where firstname like '%ROY%'" }, { "db_id": "inn_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name of rooms booked by customers whose first name has \"ROY\" in part? | rooms : roomid , roomname , beds , bedtype , maxoccupancy , baseprice , decor | reservations : code , room , checkin , checkout , rate , lastname , firstname , adults , kids | reservations.room = rooms.roomid | \n\n### Response:\n\nselect _ from _ where _ like _ | select rooms.roomname from reservations join rooms on reservations.room = rooms.roomid where firstname like '%ROY%'" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the details of the cmi masters that have the cross reference code 'Tax'? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_master_index.cmi_details from customer_master_index join cmi_cross_references on customer_master_index.master_customer_id = cmi_cross_references.master_customer_id where cmi_cross_references.source_system_code = 'Tax'" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code. | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select cmi_cross_references.cmi_cross_ref_id , cmi_cross_references.source_system_code from cmi_cross_references join council_tax on cmi_cross_references.cmi_cross_ref_id = council_tax.cmi_cross_ref_id group by cmi_cross_references.cmi_cross_ref_id having count ( * ) >= 1" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select cmi_cross_references.cmi_cross_ref_id , cmi_cross_references.master_customer_id , count ( * ) from business_rates join cmi_cross_references on business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id group by cmi_cross_references.cmi_cross_ref_id" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id. | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select cmi_cross_references.source_system_code , benefits_overpayments.council_tax_id from cmi_cross_references join benefits_overpayments on cmi_cross_references.cmi_cross_ref_id = benefits_overpayments.cmi_cross_ref_id order by benefits_overpayments.council_tax_id asc" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Wat is the tax source system code and master customer id of the taxes related to each parking fine id? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ | select cmi_cross_references.source_system_code , cmi_cross_references.master_customer_id , parking_fines.council_tax_id from cmi_cross_references join parking_fines on cmi_cross_references.cmi_cross_ref_id = parking_fines.cmi_cross_ref_id" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ where _ | select rent_arrears.council_tax_id from rent_arrears join cmi_cross_references on rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id join customer_master_index on customer_master_index.master_customer_id = cmi_cross_references.master_customer_id where customer_master_index.cmi_details != 'Schmidt , Kertzmann and Lubowitz'" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ where _ | select electoral_register.electoral_register_id from electoral_register join cmi_cross_references on electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id where cmi_cross_references.source_system_code = 'Electoral' or cmi_cross_references.source_system_code = 'Tax'" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different source system code for the cmi cross references are there? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct source_system_code ) from cmi_cross_references" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all information about customer master index, and sort them by details in descending order. | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select * from customer_master_index order by cmi_details desc" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the council tax ids and their related cmi cross references of all the parking fines. | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ | select council_tax_id , cmi_cross_ref_id from parking_fines" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many council taxes are collected for renting arrears ? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from rent_arrears" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct cmi_cross_references.source_system_code from customer_master_index join cmi_cross_references on customer_master_index.master_customer_id = cmi_cross_references.master_customer_id where customer_master_index.cmi_details = 'Gottlieb , Becker and Wyman'" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cmi cross reference id is not related to any parking taxes? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select cmi_cross_ref_id from cmi_cross_references except select cmi_cross_ref_id from parking_fines" }, { "db_id": "local_govt_mdm", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which distinct source system code includes the substring 'en'? | customer_master_index : master_customer_id , cmi_details | cmi_cross_references : cmi_cross_ref_id , master_customer_id , source_system_code | council_tax : council_tax_id , cmi_cross_ref_id | business_rates : business_rates_id , cmi_cross_ref_id | benefits_overpayments : council_tax_id , cmi_cross_ref_id | parking_fines : council_tax_id , cmi_cross_ref_id | rent_arrears : council_tax_id , cmi_cross_ref_id | electoral_register : electoral_register_id , cmi_cross_ref_id | cmi_cross_references.master_customer_id = customer_master_index.master_customer_id | council_tax.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | business_rates.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | benefits_overpayments.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | parking_fines.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | rent_arrears.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | electoral_register.cmi_cross_ref_id = cmi_cross_references.cmi_cross_ref_id | \n\n### Response:\n\nselect distinct _ from _ where _ like _ | select distinct source_system_code from cmi_cross_references where source_system_code like '%en%'" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many parties are there? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from party" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of parties. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from party" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the themes of parties in ascending order of number of hosts. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select party_theme from party order by number_of_hosts asc" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the themes of parties ordered by the number of hosts in ascending manner? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select party_theme from party order by number_of_hosts asc" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the themes and locations of parties? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ | select party_theme , location from party" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the theme and location of each party. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ | select party_theme , location from party" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the first year and last year of parties with theme \"Spring\" or \"Teqnology\". | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ | select first_year , last_year from party where party_theme = 'Spring' or party_theme = 'Teqnology'" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first year and last year of the parties whose theme is \"Spring\" or \"Teqnology\"? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ | select first_year , last_year from party where party_theme = 'Spring' or party_theme = 'Teqnology'" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of hosts for parties? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( number_of_hosts ) from party" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average number of hosts for parties. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( number_of_hosts ) from party" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location of the party with the most hosts? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select location from party order by number_of_hosts desc limit 1" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which party had the most hosts? Give me the party location. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select location from party order by number_of_hosts desc limit 1" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different nationalities along with the number of hosts of each nationality. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select nationality , count ( * ) from host group by nationality" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many hosts does each nationality have? List the nationality and the count. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select nationality , count ( * ) from host group by nationality" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common nationality of hosts. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nationality from host group by nationality order by count ( * ) desc limit 1" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which nationality has the most hosts? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nationality from host group by nationality order by count ( * ) desc limit 1" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the nations that have both hosts older than 45 and hosts younger than 35. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select nationality from host where age > 45 intersect select nationality from host where age < 35" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which nations have both hosts of age above 45 and hosts of age below 35? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select nationality from host where age > 45 intersect select nationality from host where age < 35" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the themes of parties and the names of the party hosts. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ | select party.party_theme , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each party, return its theme and the name of its host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ | select party.party_theme , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the locations of parties and the names of the party hosts in ascending order of the age of the host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select party.location , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id order by host.age asc" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select party.location , host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id order by host.age asc" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the locations of parties with hosts older than 50. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ | select party.location from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where host.age > 50" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which parties have hosts of age above 50? Give me the party locations. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ | select party.location from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where host.age > 50" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the host names for parties with number of hosts greater than 20. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ | select host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where party.number_of_hosts > 20" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which parties have more than 20 hosts? Give me the host names for these parties. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ | select host.name from party_host join host on party_host.host_id = host.host_id join party on party_host.party_id = party.party_id where party.number_of_hosts > 20" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and the nationality of the oldest host. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , nationality from host order by age desc limit 1" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and the nationality of the host of the highest age? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , nationality from host order by age desc limit 1" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of hosts who did not serve as a host of any party in our record. | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from host where host_id not in ( select host_id from party_host )" }, { "db_id": "party_host", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of hosts who did not host any party in our record? | party : party_id , party_theme , location , first_year , last_year , number_of_hosts | host : host_id , name , nationality , age | party_host : party_id , host_id , is_main_in_charge | party_host.party_id = party.party_id | party_host.host_id = host.host_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from host where host_id not in ( select host_id from party_host )" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many regions do we have? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from region" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from region" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all region code and region name sorted by the codes. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select region_code , region_name from region order by region_code asc" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes and names for all regions, sorted by codes? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select region_code , region_name from region order by region_code asc" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all region names in alphabetical order. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select region_name from region order by region_name asc" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the regions in alphabetical order? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select region_name from region order by region_name asc" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names for all regions except for Denmark. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select region_name from region where region_name != 'Denmark'" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of all regions other than Denmark. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select region_name from region where region_name != 'Denmark'" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many storms had death records? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from storm where number_deaths > 0" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of storms in which at least 1 person died. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from storm where number_deaths > 0" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List name, dates active, and number of deaths for all storms with at least 1 death. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select name , dates_active , number_deaths from storm where number_deaths >= 1" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, dates active, and number of deaths for storms that had 1 or more death? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select name , dates_active , number_deaths from storm where number_deaths >= 1" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average and maximum damage for all storms with max speed higher than 1000. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ where _ | select avg ( damage_millions_usd ) , max ( damage_millions_usd ) from storm where max_speed > 1000" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and maximum damage in millions for storms that had a max speed over 1000? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ where _ | select avg ( damage_millions_usd ) , max ( damage_millions_usd ) from storm where max_speed > 1000" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of deaths and damage for all storms with a max speed greater than the average? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect sum ( _ ) , sum ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select sum ( number_deaths ) , sum ( damage_millions_usd ) from storm where max_speed > ( select avg ( max_speed ) from storm )" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect sum ( _ ) , sum ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select sum ( number_deaths ) , sum ( damage_millions_usd ) from storm where max_speed > ( select avg ( max_speed ) from storm )" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List name and damage for all storms in a descending order of max speed. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , damage_millions_usd from storm order by max_speed desc" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and damage in millions for storms, ordered by their max speeds descending? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , damage_millions_usd from storm order by max_speed desc" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many regions are affected? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct region_id ) from affected_region" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different affected regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct region_id ) from affected_region" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name for regions not affected. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select region_name from region where region_id not in ( select region_id from affected_region )" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of regions that were not affected? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select region_name from region where region_id not in ( select region_id from affected_region )" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name for regions and the number of storms for each region. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select region.region_name , count ( * ) from region join affected_region on region.region_id = affected_region.region_id group by region.region_id" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many storms occured in each region? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select region.region_name , count ( * ) from region join affected_region on region.region_id = affected_region.region_id group by region.region_id" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name for storms and the number of affected regions for each storm. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select storm.name , count ( * ) from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many regions were affected by each storm? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select storm.name , count ( * ) from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the storm name and max speed which affected the greatest number of regions? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select storm.name , storm.max_speed from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id order by count ( * ) desc limit 1" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name and max speed of the storm that affected the most regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select storm.name , storm.max_speed from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id order by count ( * ) desc limit 1" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of storms which don't have affected region in record. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from storm where storm_id not in ( select storm_id from affected_region )" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of storms that did not affect any regions? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from storm where storm_id not in ( select storm_id from affected_region )" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show storm name with at least two regions and 10 cities affected. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ intersect select _ from _ group by _ having sum ( _ ) >= _ | select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2 intersect select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having sum ( affected_region.number_city_affected ) >= 10" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of storms that both affected two or more regions and affected a total of 10 or more cities? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ intersect select _ from _ group by _ having sum ( _ ) >= _ | select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2 intersect select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having sum ( affected_region.number_city_affected ) >= 10" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all storm names except for those with at least two affected regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ except select _ from _ group by _ having count ( _ ) >= _ | select name from storm except select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of storms that did not affect two or more regions? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ except select _ from _ group by _ having count ( _ ) >= _ | select name from storm except select storm.name from storm join affected_region on storm.storm_id = affected_region.storm_id group by storm.storm_id having count ( * ) >= 2" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the region names affected by the storm with a number of deaths of least 10? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where storm.number_deaths >= 10" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of the regions affected by storms that had a death count of at least 10. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where storm.number_deaths >= 10" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all storm names affecting region \"Denmark\". | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Denmark'" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the storms that affected Denmark? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ | select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Denmark'" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the region name with at least two storms. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select region.region_name from region join affected_region on region.region_id = affected_region.region_id group by region.region_id having count ( * ) >= 2" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of regions with two or more storms? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select region.region_name from region join affected_region on region.region_id = affected_region.region_id group by region.region_id having count ( * ) >= 2" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the regions which were affected by the storm that killed the greatest number of people. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id order by storm.number_deaths desc limit 1" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of regions that were affected by the storm in which the most people died? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select region.region_name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id order by storm.number_deaths desc limit 1" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the storm that affected both Afghanistan and Albania regions. | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Afghanistan' intersect select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Albania'" }, { "db_id": "storm_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the storms that affected both the regions of Afghanistan and Albania? | storm : storm_id , name , dates_active , max_speed , damage_millions_usd , number_deaths | region : region_id , region_code , region_name | affected_region : region_id , storm_id , number_city_affected | affected_region.storm_id = storm.storm_id | affected_region.region_id = region.region_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Afghanistan' intersect select storm.name from affected_region join region on affected_region.region_id = region.region_id join storm on affected_region.storm_id = storm.storm_id where region.region_name = 'Albania'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many counties are there in total? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the county name and population of all counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select county_name , population from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and population of each county? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select county_name , population from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average population of all counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( population ) from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On average how large is the population of the counties? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( population ) from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the maximum and minimum population among all counties. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( population ) , min ( population ) from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum population of the counties? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( population ) , min ( population ) from county" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the distinct districts for elections. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct district from election" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct districts for elections? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct district from election" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the zip code of the county with name \"Howard\". | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select zip_code from county where county_name = 'Howard'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the zip code the county named \"Howard\" is located in? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select zip_code from county where county_name = 'Howard'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the delegate from district 1 in election. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select delegate from election where district = 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the delegate of district 1 in the elections? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select delegate from election where district = 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the delegate and committee information of elections. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select delegate , committee from election" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the delegate and committee information for each election record? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select delegate , committee from election" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct governors are there? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct governor ) from party" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct governors. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct governor ) from party" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the lieutenant governor and comptroller from the democratic party. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select lieutenant_governor , comptroller from party where party = 'Democratic'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the lieutenant governor and comptroller from the democratic party? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select lieutenant_governor , comptroller from party where party = 'Democratic'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which distinct years was the governor \"Eliot Spitzer\"? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct year from party where governor = 'Eliot Spitzer'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct years when the governor was named \"Eliot Spitzer\". | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct year from party where governor = 'Eliot Spitzer'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the information about election. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select * from election" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all the information for each election record. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select * from election" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the delegates and the names of county they belong to. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select election.delegate , county.county_name from county join election on county.county_id = election.district" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the delegate and name of the county they belong to, for each county? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select election.delegate , county.county_name from county join election on county.county_id = election.district" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which delegates are from counties with population smaller than 100000? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select election.delegate from county join election on county.county_id = election.district where county.population < 100000" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the delegates who are from counties with population below 100000. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select election.delegate from county join election on county.county_id = election.district where county.population < 100000" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct delegates are from counties with population larger than 50000? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct election.delegate ) from county join election on county.county_id = election.district where county.population > 50000" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct delegates who are from counties with population above 50000. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct election.delegate ) from county join election on county.county_id = election.district where county.population > 50000" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the county that the delegates on \"Appropriations\" committee belong to? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select county.county_name from county join election on county.county_id = election.district where election.committee = 'Appropriations'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which county do the delegates on \"Appropriations\" committee belong to? Give me the county names. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select county.county_name from county join election on county.county_id = election.district where election.committee = 'Appropriations'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the delegates and the names of the party they belong to. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select election.delegate , party.party from election join party on election.party = party.party_id" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each delegate, find the names of the party they are part of. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ | select election.delegate , party.party from election join party on election.party = party.party_id" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who were the governors of the parties associated with delegates from district 1? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select party.governor from election join party on election.party = party.party_id where election.district = 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the parties associated with the delegates from district 1. Who served as governors of the parties? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select party.governor from election join party on election.party = party.party_id where election.district = 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who were the comptrollers of the parties associated with the delegates from district 1 or district 2? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select party.comptroller from election join party on election.party = party.party_id where election.district = 1 or election.district = 2" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select party.comptroller from election join party on election.party = party.party_id where election.district = 1 or election.district = 2" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all the committees that have delegates from Democratic party. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select election.committee from election join party on election.party = party.party_id where party.party = 'Democratic'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which committees have delegates from the Democratic party? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ | select election.committee from election join party on election.party = party.party_id where party.party = 'Democratic'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of each county along with the corresponding number of delegates from that county. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select county.county_name , count ( * ) from county join election on county.county_id = election.district group by county.county_id" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each county, find the name of the county and the number of delegates from that county. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select county.county_name , count ( * ) from county join election on county.county_id = election.district group by county.county_id" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of each party and the corresponding number of delegates from that party. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party.party , count ( * ) from election join party on election.party = party.party_id group by election.party" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each party, return the name of the party and the number of delegates from that party. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party.party , count ( * ) from election join party on election.party = party.party_id group by election.party" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of all counties sorted by population in ascending order. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select county_name from county order by population asc" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the names of all counties in ascending order of population. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select county_name from county order by population asc" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of all counties sorted by county name in descending alphabetical order. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select county_name from county order by county_name desc" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the names of all counties in descending alphabetical order. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select county_name from county order by county_name desc" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of the county with the biggest population. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select county_name from county order by population desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which county has the largest population? Give me the name of the county. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select county_name from county order by population desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the 3 counties with the smallest population. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select county_name from county order by population asc limit 3" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the 3 counties that have the smallest population? Give me the county names. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select county_name from county order by population asc limit 3" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of counties that have at least two delegates. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select county.county_name from county join election on county.county_id = election.district group by county.county_id having count ( * ) >= 2" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which counties have two or more delegates? Give me the county names. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select county.county_name from county join election on county.county_id = election.district group by county.county_id having count ( * ) >= 2" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of the party that has at least two records. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select party from party group by party having count ( * ) >= 2" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which party has two or more records? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select party from party group by party having count ( * ) >= 2" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of the party that has the most delegates. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select party.party from election join party on election.party = party.party_id group by election.party order by count ( * ) desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which party has the largest number of delegates? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select party.party from election join party on election.party = party.party_id group by election.party order by count ( * ) desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the people that have been governor the most times. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select governor from party group by governor order by count ( * ) desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which people severed as governor most frequently? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select governor from party group by governor order by count ( * ) desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the people that have been comptroller the most times and the corresponding number of times. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select comptroller , count ( * ) from party group by comptroller order by count ( * ) desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which people severed as comptroller most frequently? Give me the name of the person and the frequency count. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select comptroller , count ( * ) from party group by comptroller order by count ( * ) desc limit 1" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of parties that do not have delegates in election? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select party from party where party_id not in ( select party from election )" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which parties did not have any delegates in elections? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select party from party where party_id not in ( select party from election )" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of parties that have both delegates on \"Appropriations\" committee and | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select party.party from election join party on election.party = party.party_id where election.committee = 'Appropriations' intersect select party.party from election join party on election.party = party.party_id where election.committee = 'Economic Matters'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which parties have delegates in both the \"Appropriations\" committee and the \"Economic Matters\" committee? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select party.party from election join party on election.party = party.party_id where election.committee = 'Appropriations' intersect select party.party from election join party on election.party = party.party_id where election.committee = 'Economic Matters'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which committees have delegates from both democratic party and liberal party? | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select election.committee from election join party on election.party = party.party_id where party.party = 'Democratic' intersect select election.committee from election join party on election.party = party.party_id where party.party = 'Liberal'" }, { "db_id": "election", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the committees that have delegates both from from the democratic party and the liberal party. | county : county_id , county_name , population , zip_code | party : party_id , year , party , governor , lieutenant_governor , comptroller , attorney_general , us_senate | election : election_id , counties_represented , district , delegate , party , first_elected , committee | election.district = county.county_id | election.party = party.party_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select election.committee from election join party on election.party = party.party_id where party.party = 'Democratic' intersect select election.committee from election join party on election.party = party.party_id where party.party = 'Liberal'" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many journalists are there? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from journalist" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of journalists in ascending order of years working. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from journalist order by years_working asc" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the nationalities and ages of journalists? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ | select nationality , age from journalist" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of journalists from \"England\" or \"Wales\". | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ where _ | select name from journalist where nationality = 'England' or nationality = 'Wales'" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of years spent working as a journalist? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( years_working ) from journalist" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the nationality of the journalist with the largest number of years working? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select nationality from journalist order by years_working desc limit 1" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the different nationalities and the number of journalists of each nationality. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select nationality , count ( * ) from journalist group by nationality" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common nationality for journalists. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nationality from journalist group by nationality order by count ( * ) desc limit 1" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select nationality from journalist where years_working > 10 intersect select nationality from journalist where years_working < 3" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the dates, places, and names of events in descending order of the attendance. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select date , name , venue from event order by event_attendance desc" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of journalists and the dates of the events they reported. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ | select journalist.name , event.date from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of journalists and the names of the events they reported in ascending order | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select journalist.name , event.name from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id order by event.event_attendance asc" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of journalists and the number of events they reported. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select journalist.name , count ( * ) from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id group by journalist.name" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of journalists that have reported more than one event. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select journalist.name from news_report join event on news_report.event_id = event.event_id join journalist on news_report.journalist_id = journalist.journalist_id group by journalist.name having count ( * ) > 1" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of journalists who have not reported any event. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from journalist where journalist_id not in ( select journalist_id from news_report )" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the average and maximum attendances of all events? | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ | select avg ( event_attendance ) , max ( event_attendance ) from event" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age and experience working length of journalists working on different role type. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) , _ from _ group by _ | select avg ( journalist.age ) , avg ( years_working ) , news_report.work_type from journalist join news_report on journalist.journalist_id = news_report.journalist_id group by news_report.work_type" }, { "db_id": "news_report", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the event venues and names that have the top 2 most number of people attended. | event : event_id , date , venue , name , event_attendance | journalist : journalist_id , name , nationality , age , years_working | news_report : journalist_id , event_id , work_type | news_report.event_id = event.event_id | news_report.journalist_id = journalist.journalist_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select venue , name from event order by event_attendance desc limit 2" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show me all the restaurants. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select resname from restaurant" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the address of the restaurant Subway? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select address from restaurant where resname = 'Subway'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the rating of the restaurant Subway? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select rating from restaurant where resname = 'Subway'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all restaurant types. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select restypename from restaurant_type" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the restaurant type Sandwich? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select restypedescription from restaurant_type where restypename = 'Sandwich'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which restaurants have highest rating? List the restaurant name and its rating. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select resname , rating from restaurant order by rating desc limit 1" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the age of student Linda Smith? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select age from student where fname = 'Linda' and lname = 'Smith'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the gender of the student Linda Smith? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select sex from student where fname = 'Linda' and lname = 'Smith'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all students' first names and last names who majored in 600. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from student where major = 600" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city does student Linda Smith live in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select city_code from student where fname = 'Linda' and lname = 'Smith'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Advisor 1121 has how many students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student where advisor = 1121" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which Advisor has most of students? List advisor and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select advisor , count ( * ) from student group by advisor order by count ( advisor ) desc limit 1" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which major has least number of students? List the major and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc limit _ | select major , count ( * ) from student group by major order by count ( major ) asc limit 1" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which major has between 2 and 30 number of students? List major and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) between _ and _ | select major , count ( * ) from student group by major having count ( major ) between 2 and 30" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which student's age is older than 18 and is majoring in 600? List each student's first and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from student where age > 18 and major = 600" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all female students age is older than 18 who is not majoring in 600. List students' first name and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from student where age > 18 and major != 600 and sex = 'F'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many restaurant is the Sandwich type restaurant? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ group by _ having _ | select count ( * ) from restaurant join type_of_restaurant on restaurant.resid = type_of_restaurant.resid join restaurant_type on type_of_restaurant.restypeid = restaurant_type.restypeid group by type_of_restaurant.restypeid having restaurant_type.restypename = 'Sandwich'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How long does student Linda Smith spend on the restaurant in total? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( spent ) from student join visits_restaurant on student.stuid = visits_restaurant.stuid where student.fname = 'Linda' and student.lname = 'Smith'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many times has the student Linda Smith visited Subway? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join visits_restaurant on student.stuid = visits_restaurant.stuid join restaurant on visits_restaurant.resid = restaurant.resid where student.fname = 'Linda' and student.lname = 'Smith' and restaurant.resname = 'Subway'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did Linda Smith visit Subway? | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select time from student join visits_restaurant on student.stuid = visits_restaurant.stuid join restaurant on visits_restaurant.resid = restaurant.resid where student.fname = 'Linda' and student.lname = 'Smith' and restaurant.resname = 'Subway'" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ order by sum ( _ ) asc limit _ | select restaurant.resname , sum ( visits_restaurant.spent ) from visits_restaurant join restaurant on visits_restaurant.resid = restaurant.resid group by restaurant.resid order by sum ( visits_restaurant.spent ) asc limit 1" }, { "db_id": "restaurant_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which student visited restaurant most often? List student's first name and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | restaurant : resid , resname , address , rating | type_of_restaurant : resid , restypeid | restaurant_type : restypeid , restypename , restypedescription | visits_restaurant : stuid , resid , time , spent | type_of_restaurant.restypeid = restaurant_type.restypeid | type_of_restaurant.resid = restaurant.resid | visits_restaurant.resid = restaurant.resid | visits_restaurant.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select student.fname , student.lname from student join visits_restaurant on student.stuid = visits_restaurant.stuid group by student.stuid order by count ( * ) desc limit 1" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of orders whose status is 'Success'. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ where _ | select actual_order_id from actual_orders where order_status_code = 'Success'" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and price of the product that has been ordered the greatest number of times. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select products.product_name , products.product_price from products join regular_order_products on products.product_id = regular_order_products.product_id group by regular_order_products.product_id order by count ( * ) desc limit 1" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of customers in total. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different payment methods are there? | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct payment_method ) from customers" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the details of all trucks in the order of their license number. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select truck_details from trucks order by truck_licence_number asc" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the most expensive product. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_name from products order by product_price desc limit 1" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who are not living in the state of California. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select customer_name from customers except select customers.customer_name from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where addresses.state_province_county = 'California'" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and emails of customers who payed by Visa card. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_email , customer_name from customers where payment_method = 'Visa'" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and phone numbers of customers living in California state. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name , customers.customer_phone from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where addresses.state_province_county = 'California'" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the states which do not have any employee in their record. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select state_province_county from addresses where address_id not in ( select employee_address_id from employees )" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select customer_name , customer_phone , customer_email from customers order by date_became_customer asc" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the first 5 customers. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select customer_name from customers order by date_became_customer asc limit 5" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the payment method that is used most frequently. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method from customers group by payment_method order by count ( * ) desc limit 1" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all routes in alphabetic order. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select route_name from delivery_routes order by route_name asc" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of route that has the highest number of deliveries. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select delivery_routes.route_name from delivery_routes join delivery_route_locations on delivery_routes.route_id = delivery_route_locations.route_id group by delivery_routes.route_id order by count ( * ) desc limit 1" }, { "db_id": "customer_deliveries", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the state names and the number of customers living in each state. | products : product_id , product_name , product_price , product_description | addresses : address_id , address_details , city , zip_postcode , state_province_county , country | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , date_became_customer | regular_orders : regular_order_id , distributer_id | regular_order_products : regular_order_id , product_id | actual_orders : actual_order_id , order_status_code , regular_order_id , actual_order_date | actual_order_products : actual_order_id , product_id | customer_addresses : customer_id , address_id , date_from , address_type , date_to | delivery_routes : route_id , route_name , other_route_details | delivery_route_locations : location_code , route_id , location_address_id , location_name | trucks : truck_id , truck_licence_number , truck_details | employees : employee_id , employee_address_id , employee_name , employee_phone | order_deliveries : location_code , actual_order_id , delivery_status_code , driver_employee_id , truck_id , delivery_date | regular_orders.distributer_id = customers.customer_id | regular_order_products.regular_order_id = regular_orders.regular_order_id | regular_order_products.product_id = products.product_id | actual_orders.regular_order_id = regular_orders.regular_order_id | actual_order_products.actual_order_id = actual_orders.actual_order_id | actual_order_products.product_id = products.product_id | customer_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | delivery_route_locations.route_id = delivery_routes.route_id | delivery_route_locations.location_address_id = addresses.address_id | employees.employee_address_id = addresses.address_id | order_deliveries.driver_employee_id = employees.employee_id | order_deliveries.location_code = delivery_route_locations.location_code | order_deliveries.actual_order_id = actual_orders.actual_order_id | order_deliveries.truck_id = trucks.truck_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select addresses.state_province_county , count ( * ) from customer_addresses join addresses on customer_addresses.address_id = addresses.address_id group by addresses.state_province_county" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many authors are there? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from authors" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of authors. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from authors" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many institutions are there? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from inst" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of institutions. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from inst" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many papers are published in total? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from papers" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of total papers. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from papers" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of papers published by \"Jeremy Gibbons\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Jeremy' and authors.lname = 'Gibbons'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of all the papers written by \"Jeremy Gibbons\" | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Jeremy' and authors.lname = 'Gibbons'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the papers published by \"Aaron Turon\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Aaron' and authors.lname = 'Turon'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of all the papers written by \"Aaron Turon\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Aaron' and authors.lname = 'Turon'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many papers have \"Atsushi Ohori\" published? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Atsushi' and authors.lname = 'Ohori'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many papers are \"Atsushi Ohori\" the author of? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Atsushi' and authors.lname = 'Ohori'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the institution that \"Matthias Blume\" belongs to? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct inst.name from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where authors.fname = 'Matthias' and authors.lname = 'Blume'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which institution is the author \"Matthias Blume\" belong to? Give me the name of the institution. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct inst.name from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where authors.fname = 'Matthias' and authors.lname = 'Blume'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which institution does \"Katsuhiro Ueno\" belong to? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct inst.name from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where authors.fname = 'Katsuhiro' and authors.lname = 'Ueno'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the institution the author \"Katsuhiro Ueno\" belongs to? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct inst.name from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where authors.fname = 'Katsuhiro' and authors.lname = 'Ueno'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who belong to the institution \"University of Oxford\"? Show the first names and last names. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct authors.fname , authors.lname from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where inst.name = 'University of Oxford'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and last names of the authors whose institution affiliation is \"University of Oxford\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct authors.fname , authors.lname from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where inst.name = 'University of Oxford'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which authors belong to the institution \"Google\"? Show the first names and last names. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct authors.fname , authors.lname from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where inst.name = 'Google'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and last names of the authors whose institution affiliation is \"Google\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct authors.fname , authors.lname from authors join authorship on authors.authid = authorship.authid join inst on authorship.instid = inst.instid where inst.name = 'Google'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of the author of the paper titled \"Binders Unbound\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title = 'Binders Unbound'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the author of the paper titled \"Binders Unbound\"? Give me the last name. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title = 'Binders Unbound'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of the author(s) who wrote the paper \"Nameless, Painless\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select authors.fname , authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title = 'Nameless , Painless'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last name of the author who published the paper titled \"Nameless, Painless\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select authors.fname , authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title = 'Nameless , Painless'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the papers published under the institution \"Indiana University\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct papers.title from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'Indiana University'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the titles of the papers whose authors are from the institution \"Indiana University\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct papers.title from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'Indiana University'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the papers published by the institution \"Google\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct papers.title from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'Google'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which papers were written by authors from the institution \"Google\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct papers.title from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'Google'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many papers are published by the institution \"Tokohu University\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct papers.title ) from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'Tokohu University'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of papers published by authors from the institution \"Tokohu University\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct papers.title ) from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'Tokohu University'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of papers published by the institution \"University of Pennsylvania\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct papers.title ) from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'University of Pennsylvania'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many papers are written by authors from the institution \"University of Pennsylvania\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct papers.title ) from papers join authorship on papers.paperid = authorship.paperid join inst on authorship.instid = inst.instid where inst.name = 'University of Pennsylvania'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the papers which have \"Olin Shivers\" as an author. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Olin' and authors.lname = 'Shivers'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which papers did the author \"Olin Shivers\" write? Give me the paper titles. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Olin' and authors.lname = 'Shivers'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which papers have \"Stephanie Weirich\" as an author? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Stephanie' and authors.lname = 'Weirich'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of the papers the author \"Stephanie Weirich\" wrote. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where authors.fname = 'Stephanie' and authors.lname = 'Weirich'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid join inst on authorship.instid = inst.instid where inst.country = 'USA' and authorship.authorder = 2 and authors.lname = 'Turon'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find papers whose second author has last name \"Turon\" and is affiliated with an institution in the country \"USA\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid join inst on authorship.instid = inst.instid where inst.country = 'USA' and authorship.authorder = 2 and authors.lname = 'Turon'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid join inst on authorship.instid = inst.instid where inst.country = 'Japan' and authorship.authorder = 1 and authors.lname = 'Ohori'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which papers' first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"? Give me the titles of the papers. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select papers.title from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid join inst on authorship.instid = inst.instid where inst.country = 'Japan' and authorship.authorder = 1 and authors.lname = 'Ohori'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the author that has published the most papers? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid group by authors.fname , authors.lname order by count ( * ) desc limit 1" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which author has written the most papers? Find his or her last name. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid group by authors.fname , authors.lname order by count ( * ) desc limit 1" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Retrieve the country that has published the most papers. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select inst.country from inst join authorship on inst.instid = authorship.instid join papers on authorship.paperid = papers.paperid group by inst.country order by count ( * ) desc limit 1" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the country that the most papers are affiliated with. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select inst.country from inst join authorship on inst.instid = authorship.instid join papers on authorship.paperid = papers.paperid group by inst.country order by count ( * ) desc limit 1" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the organization that has published the largest number of papers. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select inst.name from inst join authorship on inst.instid = authorship.instid join papers on authorship.paperid = papers.paperid group by inst.name order by count ( * ) desc limit 1" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which institution has the most papers? Find the name of the institution. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select inst.name from inst join authorship on inst.instid = authorship.instid join papers on authorship.paperid = papers.paperid group by inst.name order by count ( * ) desc limit 1" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles of the papers that contain the word \"ML\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from papers where title like '%ML%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which papers have the substring \"ML\" in their titles? Return the titles of the papers. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from papers where title like '%ML%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which paper's title contains the word \"Database\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from papers where title like '%Database%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which papers have the substring \"Database\" in their titles? Show the titles of the papers. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from papers where title like '%Database%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of all the authors who have written a paper with title containing the word \"Functional\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select authors.fname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title like '%Functional%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who has written a paper that has the word \"Functional\" in its title? Return the first names of the authors. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select authors.fname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title like '%Functional%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of all the authors that have written a paper with title containing the word \"Monadic\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title like '%Monadic%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which authors have written a paper with title containing the word \"Monadic\"? Return their last names. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ like _ | select authors.lname from authors join authorship on authors.authid = authorship.authid join papers on authorship.paperid = papers.paperid where papers.title like '%Monadic%'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Retrieve the title of the paper that has the largest number of authors. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select papers.title from authorship join papers on authorship.paperid = papers.paperid where authorship.authorder = ( select max ( authorder ) from authorship )" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which paper has the most authors? Give me the paper title. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select papers.title from authorship join papers on authorship.paperid = papers.paperid where authorship.authorder = ( select max ( authorder ) from authorship )" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of the author with last name \"Ueno\"? | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select fname from authors where lname = 'Ueno'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which authors have last name \"Ueno\"? List their first names. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select fname from authors where lname = 'Ueno'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of the author with first name \"Amal\". | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select lname from authors where fname = 'Amal'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which authors have first name \"Amal\"? List their last names. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ where _ | select lname from authors where fname = 'Amal'" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of all the authors ordered in alphabetical order. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ order by _ asc | select fname from authors order by fname asc" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the first names of all the authors in alphabetical order. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ order by _ asc | select fname from authors order by fname asc" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Retrieve all the last names of authors in alphabetical order. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ order by _ asc | select lname from authors order by lname asc" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of all the last names of authors sorted in alphabetical order | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ order by _ asc | select lname from authors order by lname asc" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Retrieve all the first and last names of authors in the alphabetical order of last names. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ order by _ asc | select fname , lname from authors order by lname asc" }, { "db_id": "icfp_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the list of all the first and last names of authors in alphabetical order of the last names. | inst : instid , name , country | authors : authid , lname , fname | papers : paperid , title | authorship : authid , instid , paperid , authorder | authorship.paperid = papers.paperid | authorship.instid = inst.instid | authorship.authid = authors.authid | \n\n### Response:\n\nselect _ from _ order by _ asc | select fname , lname from authors order by lname asc" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different last names do the actors and actresses have? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct last_name ) from actor" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different last names actors have. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct last_name ) from actor" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most popular first name of the actors? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select first_name from actor group by first_name order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the most common first name among all actors. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select first_name from actor group by first_name order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most popular full name of the actors? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select first_name , last_name from actor group by first_name , last_name order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the most common full name among all actors. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select first_name , last_name from actor group by first_name , last_name order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which districts have at least two addresses? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select district from address group by district having count ( * ) >= 2" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the districts which have two or more addresses. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select district from address group by district having count ( * ) >= 2" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the phone number and postal code of the address 1031 Daugavpils Parkway? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select phone , postal_code from address where address = '1031 Daugavpils Parkway'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select phone , postal_code from address where address = '1031 Daugavpils Parkway'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city has the most addresses? List the city name, number of addresses, and city id. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) , _ from _ group by _ order by count ( _ ) desc limit _ | select city.city , count ( * ) , address.city_id from address join city on address.city_id = city.city_id group by address.city_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the city name, id, and number of addresses corresponding to the city with the most addressed? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) , _ from _ group by _ order by count ( _ ) desc limit _ | select city.city , count ( * ) , address.city_id from address join city on address.city_id = city.city_id group by address.city_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many addresses are in the district of California? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from address where district = 'California'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of addressed in the California district. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from address where district = 'California'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ group by _ having count ( _ ) < _ | select title , film_id from film where rental_rate = 0.99 intersect select film.title , film.film_id from film join inventory on film.film_id = inventory.film_id group by film.film_id having count ( * ) < 3" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ group by _ having count ( _ ) < _ | select title , film_id from film where rental_rate = 0.99 intersect select film.title , film.film_id from film join inventory on film.film_id = inventory.film_id group by film.film_id having count ( * ) < 3" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many cities are in Australia? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from city join country on city.country_id = country.country_id where country.country = 'Australia'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of cities in Australia. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from city join country on city.country_id = country.country_id where country.country = 'Australia'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which countries have at least 3 cities? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select country.country from city join country on city.country_id = country.country_id group by country.country_id having count ( * ) >= 3" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries that contain 3 or more cities? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select country.country from city join country on city.country_id = country.country_id group by country.country_id having count ( * ) >= 3" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select payment_date from payment where amount > 10 union select payment.payment_date from payment join staff on payment.staff_id = staff.staff_id where staff.first_name = 'Elsa'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select payment_date from payment where amount > 10 union select payment.payment_date from payment join staff on payment.staff_id = staff.staff_id where staff.first_name = 'Elsa'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers have an active value of 1? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customer where active = '1'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers who are active. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customer where active = '1'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which film has the highest rental rate? And what is the rate? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select title , rental_rate from film order by rental_rate desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the title and rental rate of the film with the highest rental rate? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select title , rental_rate from film order by rental_rate desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which film has the most number of actors or actresses? List the film name, film id and description. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select film.title , film.film_id , film.description from film_actor join film on film_actor.film_id = film.film_id group by film.film_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the title, id, and description of the movie with the greatest number of actors? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select film.title , film.film_id , film.description from film_actor join film on film_actor.film_id = film.film_id group by film.film_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which film actor (actress) starred the most films? List his or her first name, last name and actor id. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select actor.first_name , actor.last_name , actor.actor_id from film_actor join actor on film_actor.actor_id = actor.actor_id group by actor.actor_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the full name and id of the actor or actress who starred in the greatest number of films. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select actor.first_name , actor.last_name , actor.actor_id from film_actor join actor on film_actor.actor_id = actor.actor_id group by actor.actor_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select actor.first_name , actor.last_name from film_actor join actor on film_actor.actor_id = actor.actor_id group by actor.actor_id having count ( * ) > 30" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of actors who had roles in more than 30 films? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select actor.first_name , actor.last_name from film_actor join actor on film_actor.actor_id = actor.actor_id group by actor.actor_id having count ( * ) > 30" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which store owns most items? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select store_id from inventory group by store_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the store that has the most items in inventory? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select store_id from inventory group by store_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of all payments? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount ) from payment" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the sum of all payment amounts. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount ) from payment" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc limit _ | select customer.first_name , customer.last_name , customer.customer_id from customer join payment on customer.customer_id = payment.customer_id group by customer.customer_id order by sum ( amount ) asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the full name and id of the customer who has the lowest total amount of payment? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc limit _ | select customer.first_name , customer.last_name , customer.customer_id from customer join payment on customer.customer_id = payment.customer_id group by customer.customer_id order by sum ( amount ) asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the genre name of the film HUNGER ROOF? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select category.name from category join film_category on category.category_id = film_category.category_id join film on film_category.film_id = film.film_id where film.title = 'HUNGER ROOF'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the category to which the film 'HUNGER ROOF' belongs. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select category.name from category join film_category on category.category_id = film_category.category_id join film on film_category.film_id = film.film_id where film.title = 'HUNGER ROOF'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many films are there in each category? List the genre name, genre id and the count. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select category.name , film_category.category_id , count ( * ) from film_category join category on film_category.category_id = category.category_id group by film_category.category_id" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of the different categories, and how many films are in each? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select category.name , film_category.category_id , count ( * ) from film_category join category on film_category.category_id = category.category_id group by film_category.category_id" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which film has the most copies in the inventory? List both title and id. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select film.title , film.film_id from film join inventory on film.film_id = inventory.film_id group by film.film_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title and id of the film that has the greatest number of copies in inventory? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select film.title , film.film_id from film join inventory on film.film_id = inventory.film_id group by film.film_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the film title and inventory id of the item in the inventory which was rented most frequently? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select film.title , inventory.inventory_id from film join inventory on film.film_id = inventory.film_id join rental on inventory.inventory_id = rental.inventory_id group by inventory.inventory_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the title and inventory id of the film that is rented most often. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select film.title , inventory.inventory_id from film join inventory on film.film_id = inventory.film_id join rental on inventory.inventory_id = rental.inventory_id group by inventory.inventory_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many languages are in these films? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct language_id ) from film" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different languages in these films. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct language_id ) from film" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the movies rated as R? List the titles. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select title from film where rating = 'R'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the titles of any movies with an R rating. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select title from film where rating = 'R'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where is store 1 located? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address.address from store join address on store.address_id = address.address_id where store_id = 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the address of store 1. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address.address from store join address on store.address_id = address.address_id where store_id = 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which staff handled least number of payments? List the full name and the id. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select staff.first_name , staff.last_name , staff.staff_id from staff join payment on staff.staff_id = payment.staff_id group by staff.staff_id order by count ( * ) asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the full name and staff id of the staff who has handled the fewest payments. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select staff.first_name , staff.last_name , staff.staff_id from staff join payment on staff.staff_id = payment.staff_id group by staff.staff_id order by count ( * ) asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which language does the film AIRPORT POLLOCK use? List the language name. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select language.name from film join language on film.language_id = language.language_id where film.title = 'AIRPORT POLLOCK'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the language that the film 'AIRPORT POLLOCK' is in? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select language.name from film join language on film.language_id = language.language_id where film.title = 'AIRPORT POLLOCK'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many stores are there? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from store" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of stores. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from store" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many kinds of different ratings are listed? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct rating ) from film" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different film ratings. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct rating ) from film" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which movies have 'Deleted Scenes' as a substring in the special feature? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from film where special_features like '%Deleted Scenes%'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the titles of films that include 'Deleted Scenes' in their special feature section. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from film where special_features like '%Deleted Scenes%'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many items in inventory does store 1 have? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from inventory where store_id = 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of items store 1 has in stock. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from inventory where store_id = 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the first payment happen? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select payment_date from payment order by payment_date asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What was the date of the earliest payment? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select payment_date from payment order by payment_date asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where does the customer with the first name Linda live? And what is her email? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address.address , customer.email from customer join address on address.address_id = customer.address_id where customer.first_name = 'LINDA'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the address and email of the customer with the first name Linda. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address.address , customer.email from customer join address on address.address_id = customer.address_id where customer.first_name = 'LINDA'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select title from film where length > 100 or rating = 'PG' except select title from film where replacement_cost > 200" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select title from film where length > 100 or rating = 'PG' except select title from film where replacement_cost > 200" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name and the last name of the customer who made the earliest rental? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select customer.first_name , customer.last_name from customer join rental on customer.customer_id = rental.customer_id order by rental.rental_date asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the full name of the customer who made the first rental. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select customer.first_name , customer.last_name from customer join rental on customer.customer_id = rental.customer_id order by rental.rental_date asc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct staff.first_name , staff.last_name from staff join rental on staff.staff_id = rental.staff_id join customer on rental.customer_id = customer.customer_id where customer.first_name = 'APRIL' and customer.last_name = 'BURNS'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct staff.first_name , staff.last_name from staff join rental on staff.staff_id = rental.staff_id join customer on rental.customer_id = customer.customer_id where customer.first_name = 'APRIL' and customer.last_name = 'BURNS'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which store has most the customers? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select store_id from customer group by store_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the id of the store with the most customers. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select store_id from customer group by store_id order by count ( * ) desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the largest payment amount? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select amount from payment order by amount desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the amount of the largest payment. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select amount from payment order by amount desc limit 1" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where does the staff member with the first name Elsa live? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address.address from staff join address on staff.address_id = address.address_id where staff.first_name = 'Elsa'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the address of the staff member who has the first name Elsa. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address.address from staff join address on staff.address_id = address.address_id where staff.first_name = 'Elsa'" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'? | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select first_name from customer where customer_id not in ( select customer_id from rental where rental_date > '2005-08-23 02:06:01' )" }, { "db_id": "sakila_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'. | actor : actor_id , first_name , last_name , last_update | address : address_id , address , address2 , district , city_id , postal_code , phone , last_update | category : category_id , name , last_update | city : city_id , city , country_id , last_update | country : country_id , country , last_update | customer : customer_id , store_id , first_name , last_name , email , address_id , active , create_date , last_update | film : film_id , title , description , release_year , language_id , original_language_id , rental_duration , rental_rate , length , replacement_cost , rating , special_features , last_update | film_actor : actor_id , film_id , last_update | film_category : film_id , category_id , last_update | film_text : film_id , title , description | inventory : inventory_id , film_id , store_id , last_update | language : language_id , name , last_update | payment : payment_id , customer_id , staff_id , rental_id , amount , payment_date , last_update | rental : rental_id , rental_date , inventory_id , customer_id , return_date , staff_id , last_update | staff : staff_id , first_name , last_name , address_id , picture , email , store_id , active , username , password , last_update | store : store_id , manager_staff_id , address_id , last_update | address.city_id = city.city_id | city.country_id = country.country_id | customer.store_id = store.store_id | customer.address_id = address.address_id | film.original_language_id = language.language_id | film.language_id = language.language_id | film_actor.film_id = film.film_id | film_actor.actor_id = actor.actor_id | film_category.category_id = category.category_id | film_category.film_id = film.film_id | inventory.film_id = film.film_id | inventory.store_id = store.store_id | payment.staff_id = staff.staff_id | payment.customer_id = customer.customer_id | payment.rental_id = rental.rental_id | rental.customer_id = customer.customer_id | rental.inventory_id = inventory.inventory_id | rental.staff_id = staff.staff_id | staff.address_id = address.address_id | store.address_id = address.address_id | store.manager_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select first_name from customer where customer_id not in ( select customer_id from rental where rental_date > '2005-08-23 02:06:01' )" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many bank branches are there? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of bank branches. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are there? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( no_of_customers ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of customers across banks? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( no_of_customers ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of customers in the banks at New York City. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( no_of_customers ) from bank where city = 'New York City'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of customers who use banks in New York City? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( no_of_customers ) from bank where city = 'New York City'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average number of customers in all banks of Utah state. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( no_of_customers ) from bank where state = 'Utah'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of customers across banks in the state of Utah? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( no_of_customers ) from bank where state = 'Utah'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average number of customers cross all banks. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( no_of_customers ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of bank customers? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( no_of_customers ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city and state of the bank branch named morningside. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select city , state from bank where bname = 'morningside'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What city and state is the bank with the name morningside in? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select city , state from bank where bname = 'morningside'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the branch names of banks in the New York state. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select bname from bank where state = 'New York'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of banks in the state of New York? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select bname from bank where state = 'New York'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all customers sorted by their account balance in ascending order. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select cust_name from customer order by acc_bal asc" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all customers, ordered by account balance? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select cust_name from customer order by acc_bal asc" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all different customers who have some loan sorted by their total loan amount. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name order by sum ( loan.amount ) asc" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name order by sum ( loan.amount ) asc" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the state, account type, and credit score of the customer whose number of loan is 0. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select state , acc_type , credit_score from customer where no_of_loans = 0" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the states, account types, and credit scores for customers who have 0 loans? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select state , acc_type , credit_score from customer where no_of_loans = 0" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of different cities which banks are located at. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In how many different cities are banks located? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of different states which banks are located at. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct state ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In how many different states are banks located? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct state ) from bank" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct types of accounts are there? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct acc_type ) from customer" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different account types. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct acc_type ) from customer" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and account balance of the customer whose name includes the letter 'a'. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select cust_name , acc_bal from customer where cust_name like '%a%'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and account balances of customers with the letter a in their names? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select cust_name , acc_bal from customer where cust_name like '%a%'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total account balance of each customer from Utah or Texas. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( acc_bal ) from customer where state = 'Utah' or state = 'Texas'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total account balances for each customer from Utah or Texas? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( acc_bal ) from customer where state = 'Utah' or state = 'Texas'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers who have both saving and checking account types. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select cust_name from customer where acc_type = 'saving' intersect select cust_name from customer where acc_type = 'checking'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who have both savings and checking accounts? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select cust_name from customer where acc_type = 'saving' intersect select cust_name from customer where acc_type = 'checking'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers who do not have an saving account. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select cust_name from customer except select cust_name from customer where acc_type = 'saving'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who do not have saving accounts? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select cust_name from customer except select cust_name from customer where acc_type = 'saving'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers who do not have a loan with a type of Mortgages. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select cust_name from customer except select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan.loan_type = 'Mortgages'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who have not taken a Mortage loan? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select cust_name from customer except select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan.loan_type = 'Mortgages'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers who have loans of both Mortgages and Auto. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Mortgages' intersect select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Auto'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who have taken both Mortgage and Auto loans? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Mortgages' intersect select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where loan_type = 'Auto'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers whose credit score is below the average credit scores of all customers. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select cust_name from customer where credit_score < ( select avg ( credit_score ) from customer )" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers with credit score less than the average credit score across customers? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select cust_name from customer where credit_score < ( select avg ( credit_score ) from customer )" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the branch name of the bank that has the most number of customers. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select bname from bank order by no_of_customers desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the bank branch with the greatest number of customers? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select bname from bank order by no_of_customers desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customer who has the lowest credit score. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select cust_name from customer order by credit_score asc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer with the worst credit score? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select cust_name from customer order by credit_score asc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, account type, and account balance of the customer who has the highest credit score. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select cust_name , acc_type , acc_bal from customer order by credit_score desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, account type, and account balance corresponding to the customer with the highest credit score? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select cust_name , acc_type , acc_bal from customer order by credit_score desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customer who has the highest amount of loans. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name order by sum ( loan.amount ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer who has greatest total loan amount? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name order by sum ( loan.amount ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the state which has the most number of customers. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select state from bank group by state order by sum ( no_of_customers ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which state has the greatest total number of bank customers? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select state from bank group by state order by sum ( no_of_customers ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each account type, find the average account balance of customers with credit score lower than 50. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ group by _ | select avg ( acc_bal ) , acc_type from customer where credit_score < 50 group by acc_type" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average account balance of customers with credit score below 50 for the different account types? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ group by _ | select avg ( acc_bal ) , acc_type from customer where credit_score < 50 group by acc_type" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each state, find the total account balance of customers whose credit score is above 100. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ where _ group by _ | select sum ( acc_bal ) , state from customer where credit_score > 100 group by state" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total account balance for customers with a credit score of above 100 for the different states? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ where _ group by _ | select sum ( acc_bal ) , state from customer where credit_score > 100 group by state" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total amount of loans offered by each bank branch. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( amount ) , bank.bname from bank join loan on bank.branch_id = loan.branch_id group by bank.bname" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the different bank branches, and what are their total loan amounts? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( amount ) , bank.bname from bank join loan on bank.branch_id = loan.branch_id group by bank.bname" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers who have more than one loan. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name having count ( * ) > 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who have taken out more than one loan? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name having count ( * ) > 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and account balance of the customers who have loans with a total amount of more than 5000. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select customer.cust_name , customer.acc_type from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name having sum ( loan.amount ) > 5000" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and account balances for customers who have taken a total amount of more than 5000 in loans? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select customer.cust_name , customer.acc_type from customer join loan on customer.cust_id = loan.cust_id group by customer.cust_name having sum ( loan.amount ) > 5000" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of bank branch that provided the greatest total amount of loans. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select bank.bname from bank join loan on bank.branch_id = loan.branch_id group by bank.bname order by sum ( loan.amount ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the bank branch that has lent the greatest amount? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select bank.bname from bank join loan on bank.branch_id = loan.branch_id group by bank.bname order by sum ( loan.amount ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by sum ( _ ) desc limit _ | select bank.bname from loan join bank on loan.branch_id = bank.branch_id join customer on loan.cust_id = customer.cust_id where customer.credit_score < 100 group by bank.bname order by sum ( loan.amount ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by sum ( _ ) desc limit _ | select bank.bname from loan join bank on loan.branch_id = bank.branch_id join customer on loan.cust_id = customer.cust_id where customer.credit_score < 100 group by bank.bname order by sum ( loan.amount ) desc limit 1" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of bank branches that provided some loans. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct bank.bname from bank join loan on bank.branch_id = loan.branch_id" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the different banks that have provided loans? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct bank.bname from bank join loan on bank.branch_id = loan.branch_id" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and credit score of the customers who have some loans. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customer.cust_name , customer.credit_score from customer join loan on customer.cust_id = loan.cust_id" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names and credit scores of customers who have taken a loan? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customer.cust_name , customer.credit_score from customer join loan on customer.cust_id = loan.cust_id" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the the name of the customers who have a loan with amount more than 3000. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where amount > 3000" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who have a loan of more than 3000 in amount? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select customer.cust_name from customer join loan on customer.cust_id = loan.cust_id where amount > 3000" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city and name of bank branches that provide business loans. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select bank.bname , bank.city from bank join loan on bank.branch_id = loan.branch_id where loan.loan_type = 'Business'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and cities of bank branches that offer loans for business? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select bank.bname , bank.city from bank join loan on bank.branch_id = loan.branch_id where loan.loan_type = 'Business'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of bank branches that have provided a loan to any customer whose credit score is below 100. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select bank.bname from loan join bank on loan.branch_id = bank.branch_id join customer on loan.cust_id = customer.cust_id where customer.credit_score < 100" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of banks that have loaned money to customers with credit scores below 100? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect _ from _ where _ | select bank.bname from loan join bank on loan.branch_id = bank.branch_id join customer on loan.cust_id = customer.cust_id where customer.credit_score < 100" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total amount of loans provided by bank branches in the state of New York. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( loan.amount ) from bank join loan on bank.branch_id = loan.branch_id where bank.state = 'New York'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of money loaned by banks in New York state? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( loan.amount ) from bank join loan on bank.branch_id = loan.branch_id where bank.state = 'New York'" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average credit score of the customers who have some loan. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ in ( select _ from _ ) | select avg ( credit_score ) from customer where cust_id in ( select cust_id from loan )" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average credit score for customers who have taken a loan? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ in ( select _ from _ ) | select avg ( credit_score ) from customer where cust_id in ( select cust_id from loan )" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average credit score of the customers who do not have any loan. | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ ) | select avg ( credit_score ) from customer where cust_id not in ( select cust_id from loan )" }, { "db_id": "loan_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average credit score for customers who have never taken a loan? | bank : branch_id , bname , no_of_customers , city , state | customer : cust_id , cust_name , acc_type , acc_bal , no_of_loans , credit_score , branch_id , state | loan : loan_id , loan_type , cust_id , branch_id , amount | customer.branch_id = bank.branch_id | loan.branch_id = bank.branch_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ ) | select avg ( credit_score ) from customer where cust_id not in ( select cust_id from loan )" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many assessment notes are there in total? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from assessment_notes" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of the assessment notes? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ | select date_of_notes from assessment_notes" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many addresses have zip code 197? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from addresses where zip_postcode = '197'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct incident type codes are there? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct incident_type_code ) from behavior_incident" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all distinct detention type codes. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct detention_type_code from detention" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the start and end dates for incidents with incident type code \"NOISE\"? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select date_incident_start , date_incident_end from behavior_incident where incident_type_code = 'NOISE'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all detention summaries. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ | select detention_summary from detention" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the cell phone number and email address for all students. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ | select cell_mobile_number , email_address from students" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the email of the student with first name \"Emma\" and last name \"Rohan\"? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select email_address from students where first_name = 'Emma' and last_name = 'Rohan'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct students have been in detention? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct student_id ) from students_in_detention" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the gender of the teacher with last name \"Medhurst\"? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select gender from teachers where last_name = 'Medhurst'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the incident type description for the incident type with code \"VIOLENCE\"? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select incident_type_description from ref_incident_type where incident_type_code = 'VIOLENCE'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum and minimum monthly rental for all student addresses. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( monthly_rental ) , min ( monthly_rental ) from student_addresses" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of teachers whose email address contains the word \"man\". | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select first_name from teachers where email_address like '%man%'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all information about the assessment notes sorted by date in ascending order. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from assessment_notes order by date_of_notes asc" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all cities of addresses in alphabetical order. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select city from addresses order by city asc" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and last names of teachers in alphabetical order of last name. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select first_name , last_name from teachers order by last_name asc" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all information about student addresses, and sort by monthly rental in descending order. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select * from student_addresses order by monthly_rental desc" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and first name of the student that has the most number of assessment notes? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select assessment_notes.student_id , students.first_name from assessment_notes join students on assessment_notes.student_id = students.student_id group by assessment_notes.student_id order by count ( * ) desc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids and first names of the 3 teachers that have the most number of assessment notes? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select assessment_notes.teacher_id , teachers.first_name from assessment_notes join teachers on assessment_notes.teacher_id = teachers.teacher_id group by assessment_notes.teacher_id order by count ( * ) desc limit 3" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and last name of the student that has the most behavior incidents? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select behavior_incident.student_id , students.last_name from behavior_incident join students on behavior_incident.student_id = students.student_id group by behavior_incident.student_id order by count ( * ) desc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and last name of the teacher that has the most detentions with detention type code \"AFTER\"? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select detention.teacher_id , teachers.last_name from detention join teachers on detention.teacher_id = teachers.teacher_id where detention.detention_type_code = 'AFTER' group by detention.teacher_id order by count ( * ) desc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and first name of the student whose addresses have the highest average monthly rental? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select student_addresses.student_id , students.first_name from student_addresses join students on student_addresses.student_id = students.student_id group by student_addresses.student_id order by avg ( monthly_rental ) desc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and city of the student address with the highest average monthly rental. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select student_addresses.address_id , addresses.city from addresses join student_addresses on addresses.address_id = student_addresses.address_id group by student_addresses.address_id order by avg ( monthly_rental ) desc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the code and description of the most frequent behavior incident type? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select behavior_incident.incident_type_code , ref_incident_type.incident_type_description from behavior_incident join ref_incident_type on behavior_incident.incident_type_code = ref_incident_type.incident_type_code group by behavior_incident.incident_type_code order by count ( * ) desc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the code and description of the least frequent detention type ? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select detention.detention_type_code , ref_detention_type.detention_type_description from detention join ref_detention_type on detention.detention_type_code = ref_detention_type.detention_type_code group by detention.detention_type_code order by count ( * ) asc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the dates of assessment notes for students with first name \"Fanny\". | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select assessment_notes.date_of_notes from assessment_notes join students on assessment_notes.student_id = students.student_id where students.first_name = 'Fanny'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the texts of assessment notes for teachers with last name \"Schuster\". | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select assessment_notes.text_of_notes from assessment_notes join teachers on assessment_notes.teacher_id = teachers.teacher_id where teachers.last_name = 'Schuster'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the start and end dates of behavior incidents of students with last name \"Fahey\". | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select behavior_incident.date_incident_start , date_incident_end from behavior_incident join students on behavior_incident.student_id = students.student_id where students.last_name = 'Fahey'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the start and end dates of detentions of teachers with last name \"Schultz\". | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select detention.datetime_detention_start , datetime_detention_end from detention join teachers on detention.teacher_id = teachers.teacher_id where teachers.last_name = 'Schultz'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and zip code of the address with the highest monthly rental? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select student_addresses.address_id , addresses.zip_postcode from addresses join student_addresses on addresses.address_id = student_addresses.address_id order by monthly_rental desc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the cell phone number of the student whose address has the lowest monthly rental? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select students.cell_mobile_number from student_addresses join students on student_addresses.student_id = students.student_id order by student_addresses.monthly_rental asc limit 1" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the monthly rentals of student addresses in Texas state? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select student_addresses.monthly_rental from addresses join student_addresses on addresses.address_id = student_addresses.address_id where addresses.state_province_county = 'Texas'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and last names of students with address in Wisconsin state? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select students.first_name , students.last_name from addresses join students on addresses.address_id = students.address_id where addresses.state_province_county = 'Wisconsin'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the line 1 and average monthly rentals of all student addresses? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select addresses.line_1 , avg ( student_addresses.monthly_rental ) from addresses join student_addresses on addresses.address_id = student_addresses.address_id group by student_addresses.address_id" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the zip code of the address where the teacher with first name \"Lyla\" lives? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.zip_postcode from addresses join teachers on addresses.address_id = teachers.address_id where teachers.first_name = 'Lyla'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the email addresses of teachers whose address has zip code \"918\"? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ where _ | select teachers.email_address from addresses join teachers on addresses.address_id = teachers.address_id where addresses.zip_postcode = '918'" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are not involved in any behavior incident? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from students where student_id not in ( select student_id from behavior_incident )" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of teachers who are not involved in any detention. | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select last_name from teachers except select teachers.last_name from teachers join detention on teachers.teacher_id = detention.teacher_id" }, { "db_id": "behavior_monitoring", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the line 1 of addresses shared by some students and some teachers? | ref_address_types : address_type_code , address_type_description | ref_detention_type : detention_type_code , detention_type_description | ref_incident_type : incident_type_code , incident_type_description | addresses : address_id , line_1 , line_2 , line_3 , city , zip_postcode , state_province_county , country , other_address_details | students : student_id , address_id , first_name , middle_name , last_name , cell_mobile_number , email_address , date_first_rental , date_left_university , other_student_details | teachers : teacher_id , address_id , first_name , middle_name , last_name , gender , cell_mobile_number , email_address , other_details | assessment_notes : notes_id , student_id , teacher_id , date_of_notes , text_of_notes , other_details | behavior_incident : incident_id , incident_type_code , student_id , date_incident_start , date_incident_end , incident_summary , recommendations , other_details | detention : detention_id , detention_type_code , teacher_id , datetime_detention_start , datetime_detention_end , detention_summary , other_details | student_addresses : student_id , address_id , date_address_from , date_address_to , monthly_rental , other_details | students_in_detention : student_id , detention_id , incident_id | students.address_id = addresses.address_id | teachers.address_id = addresses.address_id | assessment_notes.teacher_id = teachers.teacher_id | assessment_notes.student_id = students.student_id | behavior_incident.student_id = students.student_id | behavior_incident.incident_type_code = ref_incident_type.incident_type_code | detention.teacher_id = teachers.teacher_id | detention.detention_type_code = ref_detention_type.detention_type_code | student_addresses.student_id = students.student_id | student_addresses.address_id = addresses.address_id | students_in_detention.student_id = students.student_id | students_in_detention.detention_id = detention.detention_id | students_in_detention.incident_id = behavior_incident.incident_id | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select addresses.line_1 from addresses join students on addresses.address_id = teachers.address_id intersect select addresses.line_1 from addresses join teachers on addresses.address_id = teachers.address_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ intersect select _ from _ group by _ having count ( _ ) < _ | select assets.asset_id , assets.asset_details from assets join asset_parts on assets.asset_id = fault_log.asset_id group by assets.asset_id having count ( * ) = 2 intersect select assets.asset_id , assets.asset_details from assets join fault_log on assets.asset_id = fault_log.asset_id group by assets.asset_id having count ( * ) < 2" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many assets does each maintenance contract contain? List the number and the contract id. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , maintenance_contracts.maintenance_contract_id from maintenance_contracts join assets on maintenance_contracts.maintenance_contract_id = assets.maintenance_contract_id group by maintenance_contracts.maintenance_contract_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many assets does each third party company supply? List the count and the company id. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , third_party_companies.company_id from third_party_companies join assets on third_party_companies.company_id = assets.supplier_company_id group by third_party_companies.company_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ union select _ from _ group by _ having count ( _ ) >= _ | select third_party_companies.company_id , third_party_companies.company_name from third_party_companies join maintenance_engineers on third_party_companies.company_id = maintenance_engineers.company_id group by third_party_companies.company_id having count ( * ) >= 2 union select third_party_companies.company_id , third_party_companies.company_name from third_party_companies join maintenance_contracts on third_party_companies.company_id = maintenance_contracts.maintenance_contract_company_id group by third_party_companies.company_id having count ( * ) >= 2" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select staff.staff_name , staff.staff_id from staff join fault_log on staff.staff_id = fault_log.recorded_by_staff_id except select staff.staff_name , staff.staff_id from staff join engineer_visits on staff.staff_id = engineer_visits.contact_staff_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which engineer has visited the most times? Show the engineer id, first name and last name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select maintenance_engineers.engineer_id , maintenance_engineers.first_name , maintenance_engineers.last_name from maintenance_engineers join engineer_visits group by maintenance_engineers.engineer_id order by count ( * ) desc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which parts have more than 2 faults? Show the part name and id. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select parts.part_name , parts.part_id from parts join part_faults on parts.part_id = part_faults.part_id group by parts.part_id having count ( * ) > 2" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all every engineer's first name, last name, details and coresponding skill description. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ | select maintenance_engineers.first_name , maintenance_engineers.last_name , maintenance_engineers.other_details , skills.skill_description from maintenance_engineers join engineer_skills on maintenance_engineers.engineer_id = engineer_skills.engineer_id join skills on engineer_skills.skill_id = skills.skill_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ | select part_faults.fault_short_name , skills.skill_description from part_faults join skills_required_to_fix on part_faults.part_fault_id = skills_required_to_fix.part_fault_id join skills on skills_required_to_fix.skill_id = skills.skill_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many assets can each parts be used in? List the part name and the number. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select parts.part_name , count ( * ) from parts join asset_parts on parts.part_id = asset_parts.part_id group by parts.part_name" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the fault descriptions and the fault status of all the faults recoreded in the logs? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ | select fault_log.fault_description , fault_log_parts.fault_status from fault_log join fault_log_parts on fault_log.fault_log_entry_id = fault_log_parts.fault_log_entry_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many engineer visits are required at most for a single fault log? List the number and the log entry id. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc limit _ | select count ( * ) , fault_log.fault_log_entry_id from fault_log join engineer_visits on fault_log.fault_log_entry_id = engineer_visits.fault_log_entry_id group by fault_log.fault_log_entry_id order by count ( * ) desc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the distinct last names of all the engineers? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct last_name from maintenance_engineers" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many fault status codes are recorded in the fault log parts table? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct fault_status from fault_log_parts" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which engineers have never visited to maintain the assets? List the engineer first name and last name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select first_name , last_name from maintenance_engineers where engineer_id not in ( select engineer_id from engineer_visits )" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the asset id, details, make and model for every asset. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ | select asset_id , asset_details , asset_make , asset_model from assets" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When was the first asset acquired? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select asset_acquired_date from assets order by asset_acquired_date asc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which part fault requires the most number of skills to fix? List part id and name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select parts.part_id , parts.part_name from parts join part_faults on parts.part_id = part_faults.part_id join skills_required_to_fix on part_faults.part_fault_id = skills_required_to_fix.part_fault_id group by parts.part_id order by count ( * ) desc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which kind of part has the least number of faults? List the part name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select parts.part_name from parts join part_faults on parts.part_id = part_faults.part_id group by parts.part_name order by count ( * ) asc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select maintenance_engineers.engineer_id , maintenance_engineers.first_name , maintenance_engineers.last_name from maintenance_engineers join engineer_visits on maintenance_engineers.engineer_id = engineer_visits.engineer_id group by maintenance_engineers.engineer_id order by count ( * ) asc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which staff have contacted which engineers? List the staff name and the engineer first name and last name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ | select staff.staff_name , maintenance_engineers.first_name , maintenance_engineers.last_name from staff join engineer_visits on staff.staff_id = engineer_visits.contact_staff_id join maintenance_engineers on engineer_visits.engineer_id = maintenance_engineers.engineer_id" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which fault log included the most number of faulty parts? List the fault log id, description and record time. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select fault_log.fault_log_entry_id , fault_log.fault_description , fault_log.fault_log_entry_datetime from fault_log join fault_log_parts on fault_log.fault_log_entry_id = fault_log_parts.fault_log_entry_id group by fault_log.fault_log_entry_id order by count ( * ) desc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which skill is used in fixing the most number of faults? List the skill id and description. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select skills.skill_id , skills.skill_description from skills join skills_required_to_fix on skills.skill_id = skills_required_to_fix.skill_id group by skills.skill_id order by count ( * ) desc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the distinct asset models? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct asset_model from assets" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the all the assets make, model, details by the disposed date ascendingly. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select asset_make , asset_model , asset_details from assets order by asset_disposed_date asc" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which part has the least chargeable amount? List the part id and amount. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select part_id , chargeable_amount from parts order by chargeable_amount asc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which company started the earliest the maintenance contract? Show the company name. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select third_party_companies.company_name from third_party_companies join maintenance_contracts on third_party_companies.company_id = maintenance_contracts.maintenance_contract_company_id order by maintenance_contracts.contract_start_date asc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of the company who concluded its contracts most recently? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select third_party_companies.company_type from third_party_companies join maintenance_contracts on third_party_companies.company_id = maintenance_contracts.maintenance_contract_company_id order by maintenance_contracts.contract_end_date desc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which gender makes up the majority of the staff? | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select gender from staff group by gender order by count ( * ) desc limit 1" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many engineers did each staff contact? List both the contact staff name and number of engineers contacted. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select staff.staff_name , count ( * ) from staff join engineer_visits on staff.staff_id = engineer_visits.contact_staff_id group by staff.staff_name" }, { "db_id": "assets_maintenance", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which assets did not incur any fault log? List the asset model. | third_party_companies : company_id , company_type , company_name , company_address , other_company_details | maintenance_contracts : maintenance_contract_id , maintenance_contract_company_id , contract_start_date , contract_end_date , other_contract_details | parts : part_id , part_name , chargeable_yn , chargeable_amount , other_part_details | skills : skill_id , skill_code , skill_description | staff : staff_id , staff_name , gender , other_staff_details | assets : asset_id , maintenance_contract_id , supplier_company_id , asset_details , asset_make , asset_model , asset_acquired_date , asset_disposed_date , other_asset_details | asset_parts : asset_id , part_id | maintenance_engineers : engineer_id , company_id , first_name , last_name , other_details | engineer_skills : engineer_id , skill_id | fault_log : fault_log_entry_id , asset_id , recorded_by_staff_id , fault_log_entry_datetime , fault_description , other_fault_details | engineer_visits : engineer_visit_id , contact_staff_id , engineer_id , fault_log_entry_id , fault_status , visit_start_datetime , visit_end_datetime , other_visit_details | part_faults : part_fault_id , part_id , fault_short_name , fault_description , other_fault_details | fault_log_parts : fault_log_entry_id , part_fault_id , fault_status | skills_required_to_fix : part_fault_id , skill_id | maintenance_contracts.maintenance_contract_company_id = third_party_companies.company_id | assets.supplier_company_id = third_party_companies.company_id | assets.maintenance_contract_id = maintenance_contracts.maintenance_contract_id | asset_parts.asset_id = assets.asset_id | asset_parts.part_id = parts.part_id | maintenance_engineers.company_id = third_party_companies.company_id | engineer_skills.skill_id = skills.skill_id | engineer_skills.engineer_id = maintenance_engineers.engineer_id | fault_log.recorded_by_staff_id = staff.staff_id | fault_log.asset_id = assets.asset_id | engineer_visits.contact_staff_id = staff.staff_id | engineer_visits.engineer_id = maintenance_engineers.engineer_id | engineer_visits.fault_log_entry_id = fault_log.fault_log_entry_id | part_faults.part_id = parts.part_id | fault_log_parts.fault_log_entry_id = fault_log.fault_log_entry_id | fault_log_parts.part_fault_id = part_faults.part_fault_id | skills_required_to_fix.skill_id = skills.skill_id | skills_required_to_fix.part_fault_id = part_faults.part_fault_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select asset_model from assets where asset_id not in ( select asset_id from fault_log )" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list the local authorities and services provided by all stations. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ | select local_authority , services from station" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: show all train numbers and names ordered by their time from early to late. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select train_number , name from train order by time asc" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the times and numbers of all trains that go to Chennai, ordered by time. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select time , train_number from train where destination = 'Chennai' order by time asc" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many trains have 'Express' in their names? | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from train where name like '%Express%'" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number and time of the train that goes from Chennai to Guruvayur. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select train_number , time from train where origin = 'Chennai' and destination = 'Guruvayur'" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of trains starting from each origin. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select origin , count ( * ) from train group by origin" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the train whose route runs through greatest number of stations. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select train.name from train join route on train.id = route.train_id group by route.train_id order by count ( * ) desc limit 1" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of trains for each station, as well as the station network name and services. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , station.network_name , station.services from station join route on station.id = route.station_id group by route.station_id" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average high temperature for each day of week? | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( high_temperature ) , day_of_week from weekly_weather group by day_of_week" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the maximum low temperature and average precipitation at the Amersham station. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect max ( _ ) , avg ( _ ) from _ where _ | select max ( weekly_weather.low_temperature ) , avg ( weekly_weather.precipitation ) from weekly_weather join station on weekly_weather.station_id = station.id where station.network_name = 'Amersham'" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names and times of trains that run through stations for the local authority Chiltern. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ where _ | select train.name , train.time from station join route on station.id = route.station_id join train on route.train_id = train.id where station.local_authority = 'Chiltern'" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different services are provided by all stations? | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct services ) from station" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and local authority of the station with has the highest average high temperature. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select station.id , station.local_authority from weekly_weather join station on weekly_weather.station_id = station.id group by weekly_weather.station_id order by avg ( high_temperature ) desc limit 1" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and local authority of the station whose maximum precipitation is higher than 50. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having max ( _ ) > _ | select station.id , station.local_authority from weekly_weather join station on weekly_weather.station_id = station.id group by weekly_weather.station_id having max ( weekly_weather.precipitation ) > 50" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: show the lowest low temperature and highest wind speed in miles per hour. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ | select min ( low_temperature ) , max ( wind_speed_mph ) from weekly_weather" }, { "db_id": "station_weather", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the origins from which more than 1 train starts. | train : id , train_number , name , origin , destination , time , interval | station : id , network_name , services , local_authority | route : train_id , station_id | weekly_weather : station_id , day_of_week , high_temperature , low_temperature , precipitation , wind_speed_mph | route.station_id = station.id | route.train_id = train.id | weekly_weather.station_id = station.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select origin from train group by origin having count ( * ) > 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of professors in accounting department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor join department on professor.dept_code = department.dept_code where dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors are in the accounting dept? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor join department on professor.dept_code = department.dept_code where dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors are teaching class with code ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct prof_num ) from class where crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors teach a class with the code ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct prof_num ) from class where crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the professor in biology department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , employee.emp_lname from professor join department on professor.dept_code = department.dept_code join employee on professor.emp_num = employee.emp_num where dept_name = 'Biology'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last name of all biology professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , employee.emp_lname from professor join department on professor.dept_code = department.dept_code join employee on professor.emp_num = employee.emp_num where dept_name = 'Biology'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and date of birth of professors teaching course ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct employee.emp_fname , employee.emp_dob from employee join class on employee.emp_num = class.prof_num where crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and birthdates of the professors in charge of ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct employee.emp_fname , employee.emp_dob from employee join class on employee.emp_num = class.prof_num where crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many classes are professor whose last name is Graztevski has? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from employee join class on employee.emp_num = class.prof_num where employee.emp_lname = 'Graztevski'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many classes does the professor whose last name is Graztevski teach? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from employee join class on employee.emp_num = class.prof_num where employee.emp_lname = 'Graztevski'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the code of the school where the accounting department belongs to? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select school_code from department where dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the school code of the accounting department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select school_code from department where dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many credits does course CIS-220 have, and what its description? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select crs_credit , crs_description from course where crs_code = 'CIS-220'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description for the CIS-220 and how many credits does it have? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select crs_credit , crs_description from course where crs_code = 'CIS-220'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the address of history department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select dept_address from department where dept_name = 'History'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where is the history department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select dept_address from department where dept_name = 'History'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different locations does the school with code BUS has? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct dept_address ) from department where school_code = 'BUS'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different locations of the school with the code BUS? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct dept_address ) from department where school_code = 'BUS'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different locations does each school have? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ | select count ( distinct dept_address ) , school_code from department group by school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count different addresses of each school. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ | select count ( distinct dept_address ) , school_code from department group by school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the description and credit for the course QM-261? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select crs_credit , crs_description from course where crs_code = 'QM-261'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the course description and number of credits for QM-261? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select crs_credit , crs_description from course where crs_code = 'QM-261'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of departments in each school. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ | select count ( distinct dept_name ) , school_code from department group by school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many departments are in each school? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ | select count ( distinct dept_name ) , school_code from department group by school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of different departments in each school whose number of different departments is less than 5. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ having count ( distinct _ ) < _ | select count ( distinct dept_name ) , school_code from department group by school_code having count ( distinct dept_name ) < 5" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different departments are there in each school that has less than 5 apartments? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ having count ( distinct _ ) < _ | select count ( distinct dept_name ) , school_code from department group by school_code having count ( distinct dept_name ) < 5" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many sections does each course has? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , crs_code from class group by crs_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many sections does each course have? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , crs_code from class group by crs_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total credit does each department offer? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( crs_credit ) , dept_code from course group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many credits does the department offer? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( crs_credit ) , dept_code from course group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of classes offered for all class rooms that held at least 2 classes. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ having count ( _ ) >= _ | select count ( * ) , class_room from class group by class_room having count ( * ) >= 2" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each classroom with at least 2 classes, how many classes are offered? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ having count ( _ ) >= _ | select count ( * ) , class_room from class group by class_room having count ( * ) >= 2" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of classes in each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , dept_code from class join course on class.crs_code = course.crs_code group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many classes are held in each department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , dept_code from class join course on class.crs_code = course.crs_code group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of classes in each school. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from class join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code group by department.school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many classes exist for each school? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from class join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code group by department.school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of professors for different school? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different professors are there for the different schools? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the count and code of the job has most employees. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select emp_jobcode , count ( * ) from employee group by emp_jobcode order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count and code of the job with the most employee? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select emp_jobcode , count ( * ) from employee group by emp_jobcode order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which school has the smallest amount of professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code order by count ( * ) asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which school has the fewest professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department.school_code from department join professor on department.dept_code = professor.dept_code group by department.school_code order by count ( * ) asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of professors with a Ph.D. degree in each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dept_code from professor where prof_high_degree = 'Ph.D.' group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors have a Ph.D. in each department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dept_code from professor where prof_high_degree = 'Ph.D.' group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students for each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , dept_code from student group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are in each department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , dept_code from student group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of hours have done for all students in each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( stu_hrs ) , dept_code from student group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many hours do the students spend studying in each department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( stu_hrs ) , dept_code from student group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the max, average, and minimum gpa of all students in each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect max ( _ ) , avg ( _ ) , min ( _ ) , _ from _ group by _ | select max ( stu_gpa ) , avg ( stu_gpa ) , min ( stu_gpa ) , dept_code from student group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the highest, lowest, and average student GPA for every department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect max ( _ ) , avg ( _ ) , min ( _ ) , _ from _ group by _ | select max ( stu_gpa ) , avg ( stu_gpa ) , min ( stu_gpa ) , dept_code from student group by dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and the average gpa of department whose students have the highest average gpa? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select department.dept_name , avg ( student.stu_gpa ) from student join department on student.dept_code = department.dept_code group by student.dept_code order by avg ( student.stu_gpa ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which department has the highest average student GPA, and what is the average gpa? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select department.dept_name , avg ( student.stu_gpa ) from student join department on student.dept_code = department.dept_code group by student.dept_code order by avg ( student.stu_gpa ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many schools exist in total? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct school_code ) from department" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many schools are there in the department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct school_code ) from department" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different classes are there? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct class_code ) from class" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many unique classes are offered? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct class_code ) from class" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses are offered? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct crs_code ) from class" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the number of different course codes? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct crs_code ) from class" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many departments does the college has? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct dept_name ) from department" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different departments are there? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct dept_name ) from department" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses are offered by the Computer Info. Systems department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from department join course on department.dept_code = course.dept_code where dept_name = 'Computer Info. Systems'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses does the department of Computer Information Systmes offer? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from department join course on department.dept_code = course.dept_code where dept_name = 'Computer Info. Systems'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many sections does course ACCT-211 has? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct class_section ) from class where crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of different class sections offered in the course ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct class_section ) from class where crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total credits of all classes offered by each department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( course.crs_credit ) , course.dept_code from course join class on course.crs_code = class.crs_code group by course.dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total number of credits offered by each department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( course.crs_credit ) , course.dept_code from course join class on course.crs_code = class.crs_code group by course.dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the department that offers the largest number of credits of all classes. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select department.dept_name from course join class on course.crs_code = class.crs_code join department on course.dept_code = department.dept_code group by course.dept_code order by sum ( course.crs_credit ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which department offers the most credits all together? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select department.dept_name from course join class on course.crs_code = class.crs_code join department on course.dept_code = department.dept_code group by course.dept_code order by sum ( course.crs_credit ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students enrolled in class ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from class join enroll on class.class_code = enroll.class_code where class.crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total number of students enrolled in ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from class join enroll on class.class_code = enroll.class_code where class.crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of each student enrolled in class ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_fname from class join enroll on class.class_code = enroll.class_code join student on enroll.stu_num = student.stu_num where class.crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students in course ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_fname from class join enroll on class.class_code = enroll.class_code join student on enroll.stu_num = student.stu_num where class.crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of students enrolled in class ACCT-211 and got grade C? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_fname from class join enroll on class.class_code = enroll.class_code join student on enroll.stu_num = student.stu_num where class.crs_code = 'ACCT-211' and enroll.enroll_grade = 'C'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students who took ACCT-211 and received a C? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_fname from class join enroll on class.class_code = enroll.class_code join student on enroll.stu_num = student.stu_num where class.crs_code = 'ACCT-211' and enroll.enroll_grade = 'C'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of employees. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from employee" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees are there all together? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from employee" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors do have a Ph.D. degree? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor where prof_high_degree = 'Ph.D.'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of professors with a Ph.D. ? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor where prof_high_degree = 'Ph.D.'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are enrolled in the class taught by some professor from the accounting department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from class join enroll on class.class_code = enroll.class_code join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code where department.dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are enrolled in some classes that are taught by an accounting professor? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from class join enroll on class.class_code = enroll.class_code join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code where department.dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department that has the largest number of students enrolled? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select department.dept_name from class join enroll on class.class_code = enroll.class_code join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code group by course.dept_code order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department with the most students enrolled? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select department.dept_name from class join enroll on class.class_code = enroll.class_code join course on class.crs_code = course.crs_code join department on course.dept_code = department.dept_code group by course.dept_code order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list names of all departments ordered by their names. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc | select dept_name from department order by dept_name asc" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all departments in alphabetical order? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc | select dept_name from department order by dept_name asc" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the codes of all courses that take place in room KLR209. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select class_code from class where class_room = 'KLR209'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes of all the courses that are located in room KLR209? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select class_code from class where class_room = 'KLR209'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first name of all employees with job code PROF ordered by their date of birth. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select emp_fname from employee where emp_jobcode = 'PROF' order by emp_dob asc" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all employees that are professors ordered by date of birth? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select emp_fname from employee where emp_jobcode = 'PROF' order by emp_dob asc" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and offices of all professors sorted by alphabetical order of their first name. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc | select employee.emp_fname , professor.prof_office from professor join employee on professor.emp_num = employee.emp_num order by employee.emp_fname asc" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and office locations for all professors sorted alphabetically by first name? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc | select employee.emp_fname , professor.prof_office from professor join employee on professor.emp_num = employee.emp_num order by employee.emp_fname asc" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the oldest employee? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select emp_fname , emp_lname from employee order by emp_dob asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the employee with the earliest date of birth? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select emp_fname , emp_lname from employee order by emp_dob asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first, last name, gpa of the youngest one among students whose GPA is above 3? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select stu_fname , stu_lname , stu_gpa from student where stu_gpa > 3 order by stu_dob desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the youngest student with a GPA above 3, and what is their GPA? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select stu_fname , stu_lname , stu_gpa from student where stu_gpa > 3 order by stu_dob desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of students who got grade C in any class? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct stu_fname from student join enroll on student.stu_num = enroll.stu_num where enroll_grade = 'C'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students who got a grade C in a class? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct stu_fname from student join enroll on student.stu_num = enroll.stu_num where enroll_grade = 'C'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of department where has the smallest number of professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department.dept_name from professor join department on professor.dept_code = department.dept_code group by professor.dept_code order by count ( * ) asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department with the fewest professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department.dept_name from professor join department on professor.dept_code = department.dept_code group by professor.dept_code order by count ( * ) asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of department where has the largest number of professors with a Ph.D. degree? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select department.dept_name , professor.dept_code from professor join department on professor.dept_code = department.dept_code where professor.prof_high_degree = 'Ph.D.' group by professor.dept_code order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which department has the most professors with a Ph.D.? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select department.dept_name , professor.dept_code from professor join department on professor.dept_code = department.dept_code where professor.prof_high_degree = 'Ph.D.' group by professor.dept_code order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of the professors who do not teach a class. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select emp_fname from employee where emp_jobcode = 'PROF' except select employee.emp_fname from employee join class on employee.emp_num = class.prof_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all professors not teaching any classes? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select emp_fname from employee where emp_jobcode = 'PROF' except select employee.emp_fname from employee join class on employee.emp_num = class.prof_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first names of the professors from the history department who do not teach a class. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select employee.emp_fname from employee join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History' except select employee.emp_fname from employee join class on employee.emp_num = class.prof_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all history professors who do not teach? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select employee.emp_fname from employee join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History' except select employee.emp_fname from employee join class on employee.emp_num = class.prof_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name and office of the professor from the history department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_lname , professor.prof_office from employee join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last name and office of all history professors? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_lname , professor.prof_office from employee join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is department name and office for the professor whose last name is Heffington? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select department.dept_name , professor.prof_office from employee join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code where employee.emp_lname = 'Heffington'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department and office location for the professor with the last name of Heffington? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select department.dept_name , professor.prof_office from employee join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code where employee.emp_lname = 'Heffington'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name and hire date of the professor who is in office DRE 102. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_lname , employee.emp_hiredate from employee join professor on employee.emp_num = professor.emp_num where professor.prof_office = 'DRE 102'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the professor whose office is located in DRE 102, and when were they hired? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_lname , employee.emp_hiredate from employee join professor on employee.emp_num = professor.emp_num where professor.prof_office = 'DRE 102'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the code of the course which the student whose last name is Smithson took? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select class.crs_code from class join enroll on class.class_code = enroll.class_code join student on student.stu_num = enroll.stu_num where student.stu_lname = 'Smithson'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the course codes for every class that the student with the last name Smithson took? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select class.crs_code from class join enroll on class.class_code = enroll.class_code join student on student.stu_num = enroll.stu_num where student.stu_lname = 'Smithson'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the description and credit of the course which the student whose last name is Smithson took? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select course.crs_description , course.crs_credit from class join enroll on class.class_code = enroll.class_code join student on student.stu_num = enroll.stu_num join course on course.crs_code = class.crs_code where student.stu_lname = 'Smithson'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many credits is the course that the student with the last name Smithson took, and what is its description? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select course.crs_description , course.crs_credit from class join enroll on class.class_code = enroll.class_code join student on student.stu_num = enroll.stu_num join course on course.crs_code = class.crs_code where student.stu_lname = 'Smithson'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors who has a either Ph.D. or MA degree? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor where prof_high_degree = 'Ph.D.' or prof_high_degree = 'MA'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors attained either Ph.D. or Masters degrees? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor where prof_high_degree = 'Ph.D.' or prof_high_degree = 'MA'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many professors who are from either Accounting or Biology department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor join department on professor.dept_code = department.dept_code where department.dept_name = 'Accounting' or department.dept_name = 'Biology'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of professors who are in the Accounting or Biology departments? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from professor join department on professor.dept_code = department.dept_code where department.dept_name = 'Accounting' or department.dept_name = 'Biology'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select employee.emp_fname from employee join class on employee.emp_num = class.prof_num where crs_code = 'CIS-220' intersect select employee.emp_fname from employee join class on employee.emp_num = class.prof_num where crs_code = 'QM-261'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of the professor who is teaching CIS-220 and QM-261? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select employee.emp_fname from employee join class on employee.emp_num = class.prof_num where crs_code = 'CIS-220' intersect select employee.emp_fname from employee join class on employee.emp_num = class.prof_num where crs_code = 'QM-261'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of student who is taking classes from accounting and Computer Info. Systems departments | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code join department on department.dept_code = course.dept_code where department.dept_name = 'Accounting' intersect select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code join department on department.dept_code = course.dept_code where department.dept_name = 'Computer Info. Systems'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students taking accoutning and Computer Information Systems classes? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code join department on department.dept_code = course.dept_code where department.dept_name = 'Accounting' intersect select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code join department on department.dept_code = course.dept_code where department.dept_name = 'Computer Info. Systems'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average gpa of the students enrolled in the course with code ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.stu_gpa ) from enroll join student on enroll.stu_num = student.stu_num join class on enroll.class_code = class.class_code where class.crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average GPA of students taking ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.stu_gpa ) from enroll join student on enroll.stu_num = student.stu_num join class on enroll.class_code = class.class_code where class.crs_code = 'ACCT-211'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name, gpa and phone number of the top 5 students with highest gpa? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select stu_gpa , stu_phone , stu_fname from student order by stu_gpa desc limit 5" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name, GPA, and phone number of the students with the top 5 GPAs? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select stu_gpa , stu_phone , stu_fname from student order by stu_gpa desc limit 5" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the department name of the students with lowest gpa belongs to? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select department.dept_name from student join department on student.dept_code = department.dept_code order by stu_gpa asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department with the student that has the lowest GPA? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select department.dept_name from student join department on student.dept_code = department.dept_code order by stu_gpa asc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select stu_fname , stu_gpa from student where stu_gpa < ( select avg ( stu_gpa ) from student )" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name and GPA of every student that has a GPA lower than average? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select stu_fname , stu_gpa from student where stu_gpa < ( select avg ( stu_gpa ) from student )" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and address of the department that has the highest number of students. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select department.dept_name , department.dept_address from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and address of the department with the most students? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select department.dept_name , department.dept_address from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, address, number of students in the departments that have the top 3 highest number of students. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select department.dept_name , department.dept_address , count ( * ) from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 3" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, address, and number of students in the departments that have the 3 most students? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select department.dept_name , department.dept_address , count ( * ) from student join department on student.dept_code = department.dept_code group by student.dept_code order by count ( * ) desc limit 3" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and office of the professor who is in the history department and has a Ph.D. degree. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , professor.prof_office from employee join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'History' and professor.prof_high_degree = 'Ph.D.'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and office of the professors who are in the history department and have a Ph.D? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , professor.prof_office from employee join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'History' and professor.prof_high_degree = 'Ph.D.'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of all instructors who have taught some course and the course code. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , class.crs_code from class join employee on class.prof_num = employee.emp_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all teachers who have taught a course and the corresponding course codes? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , class.crs_code from class join employee on class.prof_num = employee.emp_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of all instructors who have taught some course and the course description. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all teachers who have taught a course and the corresponding descriptions? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and offices of all instructors who have taught some course and also find the course description. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , professor.prof_office , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names, office locations of all lecturers who have taught some course? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , professor.prof_office , course.crs_description from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and offices of all instructors who have taught some course and the course description and the department name. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , professor.prof_office , course.crs_description , department.dept_name from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select employee.emp_fname , professor.prof_office , course.crs_description , department.dept_name from class join employee on class.prof_num = employee.emp_num join course on class.crs_code = course.crs_code join professor on employee.emp_num = professor.emp_num join department on professor.dept_code = department.dept_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names of all students who took some course and the course description. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select student.stu_fname , student.stu_lname , course.crs_description from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all students who took a class and the corresponding course descriptions? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ | select student.stu_fname , student.stu_lname , course.crs_description from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code join course on class.crs_code = course.crs_code" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names of all students who took some course and got A or C. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_fname , student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'C' or enroll.enroll_grade = 'A'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all students taking a course who received an A or C? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_fname , student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'C' or enroll.enroll_grade = 'A'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of all professors in the Accounting department who is teaching some course and the class room. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , class.class_room from class join employee on class.prof_num = employee.emp_num join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , class.class_room from class join employee on class.prof_num = employee.emp_num join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'Accounting'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct employee.emp_fname , professor.prof_high_degree from class join employee on class.prof_num = employee.emp_num join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'Computer Info. Systems'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct employee.emp_fname , professor.prof_high_degree from class join employee on class.prof_num = employee.emp_num join professor on employee.emp_num = professor.emp_num join department on department.dept_code = professor.dept_code where department.dept_name = 'Computer Info. Systems'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the student who got a grade A in the class with code 10018. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'A' and enroll.class_code = 10018" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the student who received an A in the class with the code 10018? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select student.stu_lname from student join enroll on student.stu_num = enroll.stu_num where enroll.enroll_grade = 'A' and enroll.class_code = 10018" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and office of history professor who did not get a Ph.D. degree. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , professor.prof_office from professor join employee on professor.emp_num = employee.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History' and professor.prof_high_degree != 'Ph.D.'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and offices of history professors who don't have Ph.D.s? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ | select employee.emp_fname , professor.prof_office from professor join employee on professor.emp_num = employee.emp_num join department on professor.dept_code = department.dept_code where department.dept_name = 'History' and professor.prof_high_degree != 'Ph.D.'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of professors who are teaching more than one class. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select employee.emp_fname from class join employee on class.prof_num = employee.emp_num group by class.prof_num having count ( * ) > 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all professors who teach more than one class? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select employee.emp_fname from class join employee on class.prof_num = employee.emp_num group by class.prof_num having count ( * ) > 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of students who took exactly one class. | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num group by enroll.stu_num having count ( * ) = 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of student who only took one course? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num group by enroll.stu_num having count ( * ) = 1" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of department that offers the class whose description has the word \"Statistics\". | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ like _ | select department.dept_name from course join department on course.dept_code = department.dept_code where course.crs_description like '%Statistics%'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department that offers a course that has a description including the word \"Statistics\"? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ like _ | select department.dept_name from course join department on course.dept_code = department.dept_code where course.crs_description like '%Statistics%'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ like _ | select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code where class.crs_code = 'ACCT-211' and student.stu_lname like 'S%'" }, { "db_id": "college_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of the student whose last name starts with the letter S and is taking ACCT-211? | class : class_code , crs_code , class_section , class_time , class_room , prof_num | course : crs_code , dept_code , crs_description , crs_credit | department : dept_code , dept_name , school_code , emp_num , dept_address , dept_extension | employee : emp_num , emp_lname , emp_fname , emp_initial , emp_jobcode , emp_hiredate , emp_dob | enroll : class_code , stu_num , enroll_grade | professor : emp_num , dept_code , prof_office , prof_extension , prof_high_degree | student : stu_num , stu_lname , stu_fname , stu_init , stu_dob , stu_hrs , stu_class , stu_gpa , stu_transfer , dept_code , stu_phone , prof_num | class.prof_num = employee.emp_num | class.crs_code = course.crs_code | course.dept_code = department.dept_code | department.emp_num = employee.emp_num | enroll.stu_num = student.stu_num | enroll.class_code = class.class_code | professor.dept_code = department.dept_code | professor.emp_num = employee.emp_num | student.dept_code = department.dept_code | \n\n### Response:\n\nselect _ from _ where _ like _ | select student.stu_fname from student join enroll on student.stu_num = enroll.stu_num join class on enroll.class_code = class.class_code where class.crs_code = 'ACCT-211' and student.stu_lname like 'S%'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many clubs are there? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from club" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of clubs? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from club" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct region of clubs in ascending alphabetical order. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct region from club order by region asc" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different regions of clubs in ascending alphabetical order? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct region from club order by region asc" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of gold medals for clubs? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( gold ) from club_rank" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of gold medals for a club? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( gold ) from club_rank" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types and countries of competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ | select competition_type , country from competition" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of every competition and in which countries are they located? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ | select competition_type , country from competition" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct years in which the competitions type is not \"Tournament\"? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct year from competition where competition_type != 'Tournament'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different years for all competitions that are not of type equal to tournament? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct year from competition where competition_type != 'Tournament'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum number of silver medals for clubs. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( silver ) , min ( silver ) from club_rank" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum number of silver medals for all the clubs? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( silver ) , min ( silver ) from club_rank" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many clubs have total medals less than 10? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club_rank where total < 10" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of clubs that have less than 10 medals in total? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club_rank where total < 10" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all club names in ascending order of start year. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from club order by start_year asc" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the clubs starting with the oldest? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from club order by start_year asc" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all club names in descending alphabetical order. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from club order by name desc" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the clubs ordered in descending alphabetical order? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from club order by name desc" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the names and the players of clubs. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ | select club.name , player.player_id from club join player on club.club_id = player.club_id" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and players of all the clubs? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ | select club.name , player.player_id from club join player on club.club_id = player.club_id" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of clubs that have players with position \"Right Wing\". | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ | select club.name from club join player on club.club_id = player.club_id where player.position = 'Right Wing'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the clubs that have players in the position of \"Right Wing\"? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ | select club.name from club join player on club.club_id = player.club_id where player.position = 'Right Wing'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average points of players from club with name \"AIB\". | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( player.points ) from club join player on club.club_id = player.club_id where club.name = 'AIB'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of points for players from the \"AIB\" club? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( player.points ) from club join player on club.club_id = player.club_id where club.name = 'AIB'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the position of players and the average number of points of players of each position. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select position , avg ( points ) from player group by position" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each position, what is the average number of points for players in that position? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select position , avg ( points ) from player group by position" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the position of players with average number of points scored by players of that position bigger than 20. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) >= _ | select position from player group by name having avg ( points ) >= 20" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the positions of players whose average number of points scored by that position is larger than 20? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) >= _ | select position from player group by name having avg ( points ) >= 20" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the types of competition and the number of competitions of each type. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select competition_type , count ( * ) from competition group by competition_type" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of competition and number of competitions for that type? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select competition_type , count ( * ) from competition group by competition_type" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the most common type of competition. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select competition_type from competition group by competition_type order by count ( * ) desc limit 1" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common competition type? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select competition_type from competition group by competition_type order by count ( * ) desc limit 1" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the types of competition that have at most five competitions of that type. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select competition_type from competition group by competition_type having count ( * ) <= 5" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of competition that have most 5 competitions for that type? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select competition_type from competition group by competition_type having count ( * ) <= 5" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of clubs that do not have any players. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from club where club_id not in ( select club_id from player )" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all clubs that do not have any players? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from club where club_id not in ( select club_id from player )" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the positions with both players having more than 20 points and less than 10 points. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select position from player where points > 20 intersect select position from player where points < 10" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the positions of both players that have more than 20 20 points and less than 10 points? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select position from player where points > 20 intersect select position from player where points < 10" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show total points of all players. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( points ) from player" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of points for all players? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( points ) from player" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many different positions are there? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct position ) from player" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different position for players are listed? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct position ) from player" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the name of players who get more than the average points. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from player where points > ( select avg ( points ) from player )" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all players that got more than the average number of points? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from player where points > ( select avg ( points ) from player )" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the number of players whose points are lower than 30 in each position. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , position from player where points < 30 group by position" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of players who have points less than 30 for each position? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , position from player where points < 30 group by position" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: which country did participated in the most number of Tournament competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from competition where competition_type = 'Tournament' group by country order by count ( * ) desc limit 1" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the name of the country that participated in the most tournament competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from competition where competition_type = 'Tournament' group by country order by count ( * ) desc limit 1" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: which countries did participated in both Friendly and Tournament type competitions. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries that participated in both friendly and tournament type competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the countries that have never participated in any competition with Friendly type. | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select country from competition except select country from competition where competition_type = 'Friendly'" }, { "db_id": "sports_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries that have never participated in any friendly-type competitions? | club : club_id , name , region , start_year | club_rank : rank , club_id , gold , silver , bronze , total | player : player_id , name , position , club_id , apps , tries , goals , points | competition : competition_id , year , competition_type , country | competition_result : competition_id , club_id_1 , club_id_2 , score | club_rank.club_id = club.club_id | player.club_id = club.club_id | competition_result.competition_id = competition.competition_id | competition_result.club_id_2 = club.club_id | competition_result.club_id_1 = club.club_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select country from competition except select country from competition where competition_type = 'Friendly'" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many furniture components are there in total? | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( num_of_component ) from furniture" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name and id of the furniture with the highest market rate. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , furniture_id from furniture order by market_rate desc limit 1" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the total market rate of the furnitures that have the top 2 market shares. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect sum ( _ ) from _ order by _ desc limit _ | select sum ( market_rate ) from furniture order by market_rate desc limit 2" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the component amounts and names of all furnitures that have more than 10 components. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ where _ | select num_of_component , name from furniture where num_of_component > 10" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and component amount of the least popular furniture. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , num_of_component from furniture order by market_rate asc limit 1" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of furnitures whose prices are lower than the highest price. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ where _ < ( select max ( _ ) from _ ) | select furniture.name from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id where furniture_manufacte.price_in_dollar < ( select max ( price_in_dollar ) from furniture_manufacte )" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which manufacturer has the most number of shops? List its name and year of opening. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select open_year , name from manufacturer order by num_of_shops desc limit 1" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average number of factories for the manufacturers that have more than 20 shops. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( num_of_factories ) from manufacturer where num_of_shops > 20" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all manufacturer names and ids ordered by their opening year. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , manufacturer_id from manufacturer order by open_year asc" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ where _ | select name , open_year from manufacturer where num_of_shops > 10 or num_of_factories < 10" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect max ( _ ) , avg ( _ ) from _ where _ | select max ( num_of_shops ) , avg ( num_of_factories ) from manufacturer where open_year < 1990" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and number of shops for the company that produces the most expensive furniture. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select manufacturer.manufacturer_id , manufacturer.num_of_shops from manufacturer join furniture_manufacte on manufacturer.manufacturer_id = furniture_manufacte.manufacturer_id order by furniture_manufacte.price_in_dollar desc limit 1" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of funiture types produced by each manufacturer as well as the company names. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , manufacturer.name from manufacturer join furniture_manufacte on manufacturer.manufacturer_id = furniture_manufacte.manufacturer_id group by manufacturer.manufacturer_id" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the names and prices of furnitures which some companies are manufacturing. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ | select furniture.name , furniture_manufacte.price_in_dollar from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the market shares and names of furnitures which no any company is producing in our records. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select market_rate , name from furniture where furniture_id not in ( select furniture_id from furniture_manufacte )" }, { "db_id": "manufacturer", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components. | manufacturer : manufacturer_id , open_year , name , num_of_factories , num_of_shops | furniture : furniture_id , name , num_of_component , market_rate | furniture_manufacte : manufacturer_id , furniture_id , price_in_dollar | furniture_manufacte.furniture_id = furniture.furniture_id | furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select manufacturer.name from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id join manufacturer on furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id where furniture.num_of_component < 6 intersect select manufacturer.name from furniture join furniture_manufacte on furniture.furniture_id = furniture_manufacte.furniture_id join manufacturer on furniture_manufacte.manufacturer_id = manufacturer.manufacturer_id where furniture.num_of_component > 10" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Display the first name and department name for each employee. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.first_name , departments.department_name from employees join departments on employees.department_id = departments.department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and department name of all employees? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.first_name , departments.department_name from employees join departments on employees.department_id = departments.department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the full name (first and last name), and salary for those employees who earn below 6000. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name , salary from employees where salary < 6000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names and salaries for any employees earning less than 6000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name , salary from employees where salary < 6000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Display the first name, and department number for all employees whose last name is \"McEwen\". | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , department_id from employees where last_name = 'McEwen'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and department numbers for employees with last name McEwen? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , department_id from employees where last_name = 'McEwen'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all the information for all employees without any department number. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from employees where department_id = 'null'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the employees without a department number? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from employees where department_id = 'null'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Display all the information about the department Marketing. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from departments where department_name = 'Marketing'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about the Marketing department? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from departments where department_name = 'Marketing'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: when is the hire date for those employees whose first name does not containing the letter M? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not like _ | select hire_date from employees where first_name not like '%M%'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On what dates were employees without the letter M in their first names hired? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not like _ | select hire_date from employees where first_name not like '%M%'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not like _ | select first_name , last_name , hire_date , salary , department_id from employees where first_name not like '%M%'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full name, hire date, salary, and department id for employees without the letter M in their first name? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not like _ | select first_name , last_name , hire_date , salary , department_id from employees where first_name not like '%M%'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not like _ order by _ asc | select first_name , last_name , hire_date , salary , department_id from employees where first_name not like '%M%' order by department_id asc" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not like _ order by _ asc | select first_name , last_name , hire_date , salary , department_id from employees where first_name not like '%M%' order by department_id asc" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the phone number of employees whose salary is in the range of 8000 and 12000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select phone_number from employees where salary between 8000 and 12000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the phone numbers of employees with salaries between 8000 and 12000. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select phone_number from employees where salary between 8000 and 12000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ and _ or _ | select * from employees where salary between 8000 and 12000 and commission_pct != 'null' or department_id != 40" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all information about employees with salaries between 8000 and 12000 for which commission is not null or where their department id is not 40. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ and _ or _ | select * from employees where salary between 8000 and 12000 and commission_pct != 'null' or department_id != 40" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full name (first and last name) and salary for all employees who does not have any value for commission? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name , salary from employees where commission_pct = 'null'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the full names and salaries of employees with null commissions. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name , salary from employees where commission_pct = 'null'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Display the first and last name, and salary for those employees whose first name is ending with the letter m. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select first_name , last_name , salary from employees where first_name like '%m'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the full names and salaries for employees with first names that end with the letter m. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select first_name , last_name , salary from employees where first_name like '%m'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select job_id , hire_date from employees where hire_date between '2007-11-05' and '2009-07-05'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select job_id , hire_date from employees where hire_date between '2007-11-05' and '2009-07-05'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last name for those employees who works either in department 70 or 90? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name from employees where department_id = 70 or department_id = 90" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of employees who with in department 70 or 90? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name from employees where department_id = 70 or department_id = 90" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the salary and manager number for those employees who is working under a manager. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select salary , manager_id from employees where manager_id != 'null'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the salaries and manager ids for employees who have managers? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select salary , manager_id from employees where manager_id != 'null'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display all the details from Employees table for those employees who was hired before 2002-06-21. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from employees where hire_date < '2002-06-21'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about employees hired before June 21, 2002? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from employees where hire_date < '2002-06-21'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ like _ or _ like _ order by _ desc | select * from employees where first_name like '%D%' or first_name like '%S%' order by salary desc" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about employees with D or S in their first name, ordered by salary descending? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ like _ or _ like _ order by _ desc | select * from employees where first_name like '%D%' or first_name like '%S%' order by salary desc" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display those employees who joined after 7th September, 1987. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from employees where hire_date > '1987-09-07'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which employees were hired after September 7th, 1987? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from employees where hire_date > '1987-09-07'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the job title of jobs which minimum salary is greater than 9000. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select job_title from jobs where min_salary > 9000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which job titles correspond to jobs with salaries over 9000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select job_title from jobs where min_salary > 9000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ - _ from _ where _ between _ and _ | select job_title , max_salary - min_salary from jobs where max_salary between 12000 and 18000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ - _ from _ where _ between _ and _ | select job_title , max_salary - min_salary from jobs where max_salary between 12000 and 18000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ and _ | select email from employees where commission_pct = 'null' and salary between 7000 and 12000 and department_id = 50" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ and _ | select email from employees where commission_pct = 'null' and salary between 7000 and 12000 and department_id = 50" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee ID for each employee and the date on which he ended his previous job. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select employee_id , max ( end_date ) from job_history group by employee_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids for each employee and final dates of employment at their last job? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select employee_id , max ( end_date ) from job_history group by employee_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display those departments where more than ten employees work who got a commission percentage. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select department_id from employees group by department_id having count ( commission_pct ) > 10" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the department ids for which more than 10 employees had a commission? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select department_id from employees group by department_id having count ( commission_pct ) > 10" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of the departments where any manager is managing 4 or more employees. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( _ ) >= _ | select distinct department_id from employees group by department_id , manager_id having count ( employee_id ) >= 4" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are department ids for departments with managers managing more than 3 employees? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( _ ) >= _ | select distinct department_id from employees group by department_id , manager_id having count ( employee_id ) >= 4" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the average salary of employees for each department who gets a commission percentage. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ where _ group by _ | select department_id , avg ( salary ) from employees where commission_pct != 'null' group by department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average salary of employees who have a commission percentage that is not null? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ where _ group by _ | select department_id , avg ( salary ) from employees where commission_pct != 'null' group by department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the country ID and number of cities for each country. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country_id , count ( * ) from locations group by country_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the country id and corresponding count of cities in each country. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country_id , count ( * ) from locations group by country_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display job ID for those jobs that were done by two or more for more than 300 days. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ - _ group by _ having count ( _ ) >= _ | select job_id from job_history where end_date - start_date > 300 group by job_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the job ids for jobs done more than once for a period of more than 300 days? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ - _ group by _ having count ( _ ) >= _ | select job_id from job_history where end_date - start_date > 300 group by job_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the ID for those employees who did two or more jobs in the past. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select employee_id from job_history group by employee_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids for employees who have held two or more jobs? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select employee_id from job_history group by employee_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find employee with ID and name of the country presently where (s)he is working. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.employee_id , countries.country_name from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id join countries on locations.country_id = countries.country_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the employee ids and the names of the countries in which they work? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.employee_id , countries.country_name from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id join countries on locations.country_id = countries.country_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the department name and number of employees in each of the department. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select departments.department_name , count ( * ) from employees join departments on employees.department_id = departments.department_id group by departments.department_name" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name of each department and the number of employees in each. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select departments.department_name , count ( * ) from employees join departments on employees.department_id = departments.department_id group by departments.department_name" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from job_history join employees on job_history.employee_id = employees.employee_id where employees.salary >= 12000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the job history info done by employees earning a salary greater than or equal to 12000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from job_history join employees on job_history.employee_id = employees.employee_id where employees.salary >= 12000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display job title and average salary of employees. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select job_title , avg ( salary ) from employees join jobs on employees.job_id = jobs.job_id group by jobs.job_title" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average salary for each job title? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select job_title , avg ( salary ) from employees join jobs on employees.job_id = jobs.job_id group by jobs.job_title" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select _ from _ where _ ) | select first_name , last_name from employees where salary > ( select salary from employees where employee_id = 163 )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Provide the full names of employees earning more than the employee with id 163. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select _ from _ where _ ) | select first_name , last_name from employees where salary > ( select salary from employees where employee_id = 163 )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: return the smallest salary for every departments. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ | select min ( salary ) , department_id from employees group by department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the minimum salary in each department? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ | select min ( salary ) , department_id from employees group by department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ in ( select min ( _ ) from _ group by _ ) | select first_name , last_name , department_id from employees where salary in ( select min ( salary ) from employees group by department_id )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names and department ids for the lowest paid employees across all departments. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ in ( select min ( _ ) from _ group by _ ) | select first_name , last_name , department_id from employees where salary in ( select min ( salary ) from employees group by department_id )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the employee id for all employees who earn more than the average salary. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select employee_id from employees where salary > ( select avg ( salary ) from employees )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids for employees who make more than the average? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select employee_id from employees where salary > ( select avg ( salary ) from employees )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee id and salary of all employees who report to Payam (first name). | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ ) | select employee_id , salary from employees where manager_id = ( select employee_id from employees where first_name = 'Payam' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids of employees who report to Payam, and what are their salaries? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ ) | select employee_id , salary from employees where manager_id = ( select employee_id from employees where first_name = 'Payam' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the name of all departments that do actually have one or more employees assigned to them. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct departments.department_name from employees join departments on employees.department_id = departments.department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of departments that have at least one employee. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct departments.department_name from employees join departments on employees.department_id = departments.department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: get the details of employees who manage a department. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct * from employees join departments on employees.department_id = departments.department_id where employees.employee_id = departments.manager_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information regarding employees who are managers? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct * from employees join departments on employees.department_id = departments.department_id where employees.employee_id = departments.manager_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display all the information about the department Marketing. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from departments where department_name = 'Marketing'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about the Marketing department? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select * from departments where department_name = 'Marketing'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the ID for those employees who did two or more jobs in the past. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select employee_id from job_history group by employee_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids for those who had two or more jobs. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select employee_id from job_history group by employee_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the unique ids of those departments where any manager is managing 4 or more employees. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( _ ) >= _ | select distinct department_id from employees group by department_id , manager_id having count ( employee_id ) >= 4" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the distinct department ids of departments in which a manager is in charge of 4 or more employees? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( _ ) >= _ | select distinct department_id from employees group by department_id , manager_id having count ( employee_id ) >= 4" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the job ID for those jobs which average salary is above 8000. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ | select job_id from employees group by job_id having avg ( salary ) > 8000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the job ids corresponding to jobs with average salary above 8000? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ | select job_id from employees group by job_id having avg ( salary ) > 8000" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee ID and job name for all those jobs in department 80. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.employee_id , jobs.job_title from employees join jobs on employees.job_id = jobs.job_id where employees.department_id = 80" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the employee ids and job titles for employees in department 80? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.employee_id , jobs.job_title from employees join jobs on employees.job_id = jobs.job_id where employees.department_id = 80" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name and job id for all employees in the Finance department? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.first_name , employees.job_id from employees join departments on employees.department_id = departments.department_id where departments.department_name = 'Finance'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the first name and job id for all employees in the Finance department. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.first_name , employees.job_id from employees join departments on employees.department_id = departments.department_id where departments.department_name = 'Finance'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display all the information of the employees whose salary if within the range of smallest salary and 2500. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between ( select min ( _ ) from _ ) and _ | select * from employees where salary between ( select min ( salary ) from employees ) and 2500" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information regarding employees with salaries above the minimum and under 2500? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ between ( select min ( _ ) from _ ) and _ | select * from employees where salary between ( select min ( salary ) from employees ) and 2500" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ between _ and _ ) | select * from employees where department_id not in ( select department_id from departments where manager_id between 100 and 200 )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids for employees who do not work in departments with managers that have ids between 100 and 200? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ between _ and _ ) | select * from employees where department_id not in ( select department_id from departments where manager_id between 100 and 200 )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ ) | select first_name , last_name , hire_date from employees where department_id = ( select department_id from employees where first_name = 'Clara' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names and hire dates for employees in the same department as someone with the first name Clara? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ ) | select first_name , last_name , hire_date from employees where department_id = ( select department_id from employees where first_name = 'Clara' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ ) and _ | select first_name , last_name , hire_date from employees where department_id = ( select department_id from employees where first_name = 'Clara' ) and first_name != 'Clara'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ ) and _ | select first_name , last_name , hire_date from employees where department_id = ( select department_id from employees where first_name = 'Clara' ) and first_name != 'Clara'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a 'T'. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ like _ ) | select employee_id , first_name , last_name from employees where department_id in ( select department_id from employees where first_name like '%T%' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ like _ ) | select employee_id , first_name , last_name from employees where department_id in ( select department_id from employees where first_name like '%T%' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) and _ in ( select _ from _ where _ like _ ) | select employee_id , first_name , last_name , salary from employees where salary > ( select avg ( salary ) from employees ) and department_id in ( select department_id from employees where first_name like '%J%' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) and _ in ( select _ from _ where _ like _ ) | select employee_id , first_name , last_name , salary from employees where salary > ( select avg ( salary ) from employees ) and department_id in ( select department_id from employees where first_name like '%J%' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select employee_id , job_id from employees where salary < ( select min ( salary ) from employees where job_id = 'MK_MAN' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select employee_id , job_id from employees where salary < ( select min ( salary ) from employees where job_id = 'MK_MAN' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select employee_id , first_name , last_name , job_id from employees where salary > ( select max ( salary ) from employees where job_id = 'PU_MAN' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select employee_id , first_name , last_name , job_id from employees where salary > ( select max ( salary ) from employees where job_id = 'PU_MAN' )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the department id and the total salary for those departments which contains at least two employees. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ having count ( _ ) >= _ | select department_id , sum ( salary ) from employees group by department_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are total salaries and department id for each department that has more than 2 employees? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ having count ( _ ) >= _ | select department_id , sum ( salary ) from employees group by department_id having count ( * ) >= 2" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display all the information of those employees who did not have any job in the past. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select * from employees where employee_id not in ( select employee_id from job_history )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about employees who have never had a job in the past? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select * from employees where employee_id not in ( select employee_id from job_history )" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the department ID, full name (first and last name), salary for those employees who is highest salary in every department. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select first_name , last_name , salary , department_id , max ( salary ) from employees group by department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the department ids, full names, and salaries for employees who make the most in their departments? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select first_name , last_name , salary , department_id , max ( salary ) from employees group by department_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the first and last name, department, city, and state province for each employee. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.first_name , employees.last_name , departments.department_name , locations.city , locations.state_province from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names, departments, cities, and state provinces for each employee? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.first_name , employees.last_name , departments.department_name , locations.city , locations.state_province from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display those employees who contain a letter z to their first name and also display their last name, city. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select employees.first_name , employees.last_name , locations.city from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id where employees.first_name like '%z%'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names and cities of employees who have the letter Z in their first names? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select employees.first_name , employees.last_name , locations.city from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id where employees.first_name like '%z%'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the department name, city, and state province for each department. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select departments.department_name , locations.city , locations.state_province from departments join locations on locations.location_id = departments.location_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the department names, cities, and state provinces for each department? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select departments.department_name , locations.city , locations.state_province from departments join locations on locations.location_id = departments.location_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.first_name , employees.last_name , employees.employee_id , countries.country_name from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id join countries on locations.country_id = countries.country_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What the full names, ids of each employee and the name of the country they are in? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ | select employees.first_name , employees.last_name , employees.employee_id , countries.country_name from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id join countries on locations.country_id = countries.country_id" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the department name and number of employees in each of the department. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select department_name , count ( * ) from employees join departments on employees.department_id = departments.department_id group by department_name" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the department names and how many employees work in each of them? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select department_name , count ( * ) from employees join departments on employees.department_id = departments.department_id group by department_name" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: display the full name (first and last name), and salary of those employees who working in any department located in London. | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name , salary from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id where locations.city = 'London'" }, { "db_id": "hr_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are full names and salaries of employees working in the city of London? | regions : region_id , region_name | countries : country_id , country_name , region_id | departments : department_id , department_name , manager_id , location_id | jobs : job_id , job_title , min_salary , max_salary | employees : employee_id , first_name , last_name , email , phone_number , hire_date , job_id , salary , commission_pct , manager_id , department_id | job_history : employee_id , start_date , end_date , job_id , department_id | locations : location_id , street_address , postal_code , city , state_province , country_id | countries.region_id = regions.region_id | employees.job_id = jobs.job_id | employees.department_id = departments.department_id | job_history.job_id = jobs.job_id | job_history.department_id = departments.department_id | job_history.employee_id = employees.employee_id | locations.country_id = countries.country_id | \n\n### Response:\n\nselect _ from _ where _ | select first_name , last_name , salary from employees join departments on employees.department_id = departments.department_id join locations on departments.location_id = locations.location_id where locations.city = 'London'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the song that was released in the most recent year? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select song_name , releasedate from song order by releasedate desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the song that was released most recently? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select song_name , releasedate from song order by releasedate desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the longest song? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select f_id from files order by duration desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the song that lasts the longest. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select f_id from files order by duration desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all English songs. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select song_name from song where languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all songs in English? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select song_name from song where languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id of songs whose format is mp3. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select f_id from files where formats = 'mp3'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id of all the files in mp3 format? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select f_id from files where formats = 'mp3'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and country of origin for all singers who have produced songs with rating above 9. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name where song.rating > 9" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names and countries of origins for all artists whose song ratings are above 9? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name where song.rating > 9" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the file size and format for all songs that have resolution lower than 800. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct files.file_size , files.formats from files join song on files.f_id = song.f_id where song.resolution < 800" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the file sizes and formats for all songs with a resolution lower than 800? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct files.file_size , files.formats from files join song on files.f_id = song.f_id where song.resolution < 800" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the artist who produced the shortest song? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select song.artist_name from song join files on song.f_id = files.f_id order by files.duration asc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the artists who sang the shortest song? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select song.artist_name from song join files on song.f_id = files.f_id order by files.duration asc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and countries of origin for the artists who produced the top three highly rated songs. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name order by song.rating desc limit 3" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name order by song.rating desc limit 3" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs have 4 minute duration? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from files where duration like '4:%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of the songs that last approximately 4 minutes? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from files where duration like '4:%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many artists are from Bangladesh? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from artist where country = 'Bangladesh'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many Bangladeshi artists are listed? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from artist where country = 'Bangladesh'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average rating of songs produced by female artists? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( song.rating ) from artist join song on artist.artist_name = song.artist_name where artist.gender = 'Female'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs, on average, are sung by a female artist? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( song.rating ) from artist join song on artist.artist_name = song.artist_name where artist.gender = 'Female'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most popular file format? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select formats from files group by formats order by count ( * ) desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the file format that is used by the most files. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select formats from files group by formats order by count ( * ) desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the artists who are from UK and have produced English songs. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select artist_name from artist where country = 'UK' intersect select artist_name from song where languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the artists that are from the UK and sang songs in English? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select artist_name from artist where country = 'UK' intersect select artist_name from song where languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of songs that are available in mp4 format and have resolution lower than 1000. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select f_id from files where formats = 'mp4' intersect select f_id from song where resolution < 1000" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select f_id from files where formats = 'mp4' intersect select f_id from song where resolution < 1000" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the country of origin of the artist who is female and produced a song in Bangla? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select artist.country from artist join song on artist.artist_name = song.artist_name where artist.gender = 'Female' and song.languages = 'bangla'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What countries are the female artists who sung in the language Bangla from? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select artist.country from artist join song on artist.artist_name = song.artist_name where artist.gender = 'Female' and song.languages = 'bangla'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average duration of songs that have mp3 format and resolution below 800? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( files.duration ) from files join song on files.f_id = song.f_id where files.formats = 'mp3' and song.resolution < 800" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average song duration for the songs that are in mp3 format and whose resolution below 800? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( files.duration ) from files join song on files.f_id = song.f_id where files.formats = 'mp3' and song.resolution < 800" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of artists for each gender? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , gender from artist group by gender" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many artists are male and how many are female? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , gender from artist group by gender" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average rating of songs for each language? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( rating ) , languages from song group by languages" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average song rating for each language? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( rating ) , languages from song group by languages" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the gender and name of artist who produced the song with the lowest resolution. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select artist.gender , artist.artist_name from artist join song on artist.artist_name = song.artist_name order by song.resolution asc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the gender and name of the artist who sang the song with the smallest resolution? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select artist.gender , artist.artist_name from artist join song on artist.artist_name = song.artist_name order by song.resolution asc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each file format, return the number of artists who released songs in that format. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , formats from files group by formats" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs were released for each format? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , formats from files group by formats" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct names of all songs that have a higher resolution than some songs in English. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct song_name from song where resolution > ( select min ( resolution ) from song where languages = 'english' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names for all songs that have a higher resolution than English songs? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct song_name from song where resolution > ( select min ( resolution ) from song where languages = 'english' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all songs that have a lower rating than some song of blues genre? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ < ( select max ( _ ) from _ where _ ) | select song_name from song where rating < ( select max ( rating ) from song where genre_is = 'blues' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the songs that have a lower rating than at least one blues song? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ < ( select max ( _ ) from _ where _ ) | select song_name from song where rating < ( select max ( rating ) from song where genre_is = 'blues' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and country of origin of the artist who released a song that has \"love\" in its title? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ like _ | select artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name where song.song_name like '%love%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the artists who released a song that has the word love in its title, and where are the artists from? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ like _ | select artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name where song.song_name like '%love%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and gender for all artists who released songs in March. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ like _ | select artist.artist_name , artist.gender from artist join song on artist.artist_name = song.artist_name where song.releasedate like '%Mar%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and genders of all artists who released songs in the month of March? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ like _ | select artist.artist_name , artist.gender from artist join song on artist.artist_name = song.artist_name where song.releasedate like '%Mar%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all genres in alphabetical oder, together with its ratings. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc | select g_name , rating from genre order by g_name asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all genres in alphabetical order, combined with its ratings? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc | select g_name , rating from genre order by g_name asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of the names of all songs ordered by their resolution. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc | select song_name from song order by resolution asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all songs that are ordered by their resolution numbers? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ order by _ asc | select song_name from song order by resolution asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of songs that are available in either mp4 format or have resolution above 720? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select f_id from files where formats = 'mp4' union select f_id from song where resolution > 720" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all songs that are available on mp4 or have a higher resolution than 720? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select f_id from files where formats = 'mp4' union select f_id from song where resolution > 720" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all songs that have 4 minute duration or are in English. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ like _ union select _ from _ where _ | select song.song_name from files join song on files.f_id = song.f_id where files.duration like '4:%' union select song_name from song where languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all songs that are approximately 4 minutes long or are in English? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ like _ union select _ from _ where _ | select song.song_name from files join song on files.f_id = song.f_id where files.duration like '4:%' union select song_name from song where languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the language used most often in the songs? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select languages from song group by languages order by count ( * ) desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the languages that are used most often in songs? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select languages from song group by languages order by count ( * ) desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the language that was used most often in songs with resolution above 500? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select artist_name from song where resolution > 500 group by languages order by count ( * ) desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the artist, for each language, that has the most songs with a higher resolution than 500? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select artist_name from song where resolution > 500 group by languages order by count ( * ) desc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of artists who are Male and are from UK? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select artist_name from artist where country = 'UK' and gender = 'Male'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all male British artists? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select artist_name from artist where country = 'UK' and gender = 'Male'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of songs whose genre is modern or language is English. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select song_name from song where genre_is = 'modern' or languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the songs that are modern or sung in English? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ | select song_name from song where genre_is = 'modern' or languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of songs for which format is mp3 and resolution is below 1000. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select song.song_name from files join song on files.f_id = song.f_id where files.formats = 'mp3' intersect select song_name from song where resolution < 1000" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all songs that are in mp3 format and have a resolution lower than 1000? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select song.song_name from files join song on files.f_id = song.f_id where files.formats = 'mp3' intersect select song_name from song where resolution < 1000" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of singers who are from UK and released an English song. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select artist_name from artist where country = 'UK' intersect select artist.artist_name from artist join song on artist.artist_name = song.artist_name where song.languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all singers that are from the UK and released a song in English? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select artist_name from artist where country = 'UK' intersect select artist.artist_name from artist join song on artist.artist_name = song.artist_name where song.languages = 'english'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average rating and resolution of songs that are in Bangla? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( rating ) , avg ( resolution ) from song where languages = 'bangla'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average rating and resolution of all bangla songs? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( rating ) , avg ( resolution ) from song where languages = 'bangla'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum resolution of songs whose duration is 3 minutes? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ like _ | select max ( song.resolution ) , min ( song.resolution ) from files join song on files.f_id = song.f_id where files.duration like '3:%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum and minimum resolution of all songs that are approximately 3 minutes long? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ like _ | select max ( song.resolution ) , min ( song.resolution ) from files join song on files.f_id = song.f_id where files.duration like '3:%'" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum duration and resolution of songs grouped and ordered by languages? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect max ( _ ) , max ( _ ) , _ from _ group by _ order by _ asc | select max ( files.duration ) , max ( song.resolution ) , song.languages from files join song on files.f_id = song.f_id group by song.languages order by song.languages asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect max ( _ ) , max ( _ ) , _ from _ group by _ order by _ asc | select max ( files.duration ) , max ( song.resolution ) , song.languages from files join song on files.f_id = song.f_id group by song.languages order by song.languages asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect min ( _ ) , min ( _ ) , _ from _ group by _ order by _ asc | select min ( files.duration ) , min ( song.rating ) , song.genre_is from files join song on files.f_id = song.f_id group by song.genre_is order by song.genre_is asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect min ( _ ) , min ( _ ) , _ from _ group by _ order by _ asc | select min ( files.duration ) , min ( song.rating ) , song.genre_is from files join song on files.f_id = song.f_id group by song.genre_is order by song.genre_is asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and number of works of all artists who have at least one English songs. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ having count ( _ ) >= _ | select artist.artist_name , count ( * ) from artist join song on artist.artist_name = song.artist_name where song.languages = 'english' group by song.artist_name having count ( * ) >= 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and number of works for all artists who have sung at least one song in English? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ having count ( _ ) >= _ | select artist.artist_name , count ( * ) from artist join song on artist.artist_name = song.artist_name where song.languages = 'english' group by song.artist_name having count ( * ) >= 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and country of origin for all artists who have release at least one song of resolution above 900. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name where song.resolution > 900 group by song.artist_name having count ( * ) >= 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and country of origin for each artist who has released a song with a resolution higher than 900? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select artist.artist_name , artist.country from artist join song on artist.artist_name = song.artist_name where song.resolution > 900 group by song.artist_name having count ( * ) >= 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and number of works of the three artists who have produced the most songs. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select artist.artist_name , count ( * ) from artist join song on artist.artist_name = song.artist_name group by song.artist_name order by count ( * ) desc limit 3" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the three artists who have produced the most songs, and how many works did they produce? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select artist.artist_name , count ( * ) from artist join song on artist.artist_name = song.artist_name group by song.artist_name order by count ( * ) desc limit 3" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the country of origin for the artist who made the least number of songs? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select artist.country from artist join song on artist.artist_name = song.artist_name group by song.artist_name order by count ( * ) asc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What country is the artist who made the fewest songs from? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select artist.country from artist join song on artist.artist_name = song.artist_name group by song.artist_name order by count ( * ) asc limit 1" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the songs whose rating is below the rating of all songs in English? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select song_name from song where rating < ( select min ( rating ) from song where languages = 'english' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the song names for every song whose rating is less than the minimum rating for English songs? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select song_name from song where rating < ( select min ( rating ) from song where languages = 'english' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select f_id from song where resolution > ( select max ( resolution ) from song where rating < 8 )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of every song that has a resolution higher than that of a song with a rating below 8? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select f_id from song where resolution > ( select max ( resolution ) from song where rating < 8 )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ where _ ) | select f_id from song where resolution > ( select avg ( resolution ) from song where genre_is = 'modern' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all songs that have higher resolution of the average resolution in the modern genre? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ where _ ) | select f_id from song where resolution > ( select avg ( resolution ) from song where genre_is = 'modern' )" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the top 3 artists who have the largest number of songs works whose language is Bangla. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select artist.artist_name from artist join song on artist.artist_name = song.artist_name where song.languages = 'bangla' group by song.artist_name order by count ( * ) desc limit 3" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the top 3 artists with the largest number of songs in the language Bangla? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select artist.artist_name from artist join song on artist.artist_name = song.artist_name where song.languages = 'bangla' group by song.artist_name order by count ( * ) desc limit 3" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the id, genre and artist name of English songs ordered by rating. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select f_id , genre_is , artist_name from song where languages = 'english' order by rating asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id, genre, and name of the artist for every English song ordered by ascending rating? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select f_id , genre_is , artist_name from song where languages = 'english' order by rating asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the duration, file size and format of songs whose genre is pop, ordered by title? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select files.duration , files.file_size , files.formats from files join song on files.f_id = song.f_id where song.genre_is = 'pop' order by song.song_name asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the duration, file size, and song format for every pop song, ordered by title alphabetically? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select files.duration , files.file_size , files.formats from files join song on files.f_id = song.f_id where song.genre_is = 'pop' order by song.song_name asc" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the artists who have produced English songs but have never received rating higher than 8. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ except select distinct _ from _ where _ | select distinct artist_name from song where languages = 'english' except select distinct artist_name from song where rating > 8" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ except select distinct _ from _ where _ | select distinct artist_name from song where languages = 'english' except select distinct artist_name from song where rating > 8" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the artists who are from Bangladesh and have never received rating higher than 7. | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ except select distinct _ from _ where _ | select distinct artist_name from artist where country = 'Bangladesh' except select distinct artist_name from song where rating > 7" }, { "db_id": "music_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the different artists from Bangladesh who never received a rating higher than a 7? | genre : g_name , rating , most_popular_in | artist : artist_name , country , gender , preferred_genre | files : f_id , artist_name , file_size , duration , formats | song : song_name , artist_name , country , f_id , genre_is , rating , languages , releasedate , resolution | artist.preferred_genre = genre.g_name | files.artist_name = artist.artist_name | song.genre_is = genre.g_name | song.f_id = files.f_id | song.artist_name = artist.artist_name | \n\n### Response:\n\nselect distinct _ from _ where _ except select distinct _ from _ where _ | select distinct artist_name from artist where country = 'Bangladesh' except select distinct artist_name from song where rating > 7" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the full name and id of the college with the largest number of baseball players? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select college.name_full , college.college_id from college join player_college on college.college_id = player_college.college_id group by college.college_id order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the full name and id of the college that has the most baseball players. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select college.name_full , college.college_id from college join player_college on college.college_id = player_college.college_id group by college.college_id order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is average salary of the players in the team named 'Boston Red Stockings' ? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( salary.salary ) from salary join team on salary.team_id = team.team_id_br where team.name = 'Boston Red Stockings'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average salary of the players in the team called 'Boston Red Stockings'. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( salary.salary ) from salary join team on salary.team_id = team.team_id_br where team.name = 'Boston Red Stockings'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are first and last names of players participating in all star game in 1998? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select name_first , name_last from player join all_star on player.player_id = all_star.player_id where year = 1998" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first and last name for players who participated in all star game in 1998. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select name_first , name_last from player join all_star on player.player_id = all_star.player_id where year = 1998" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name, last name and id of the player with the most all star game experiences? Also list the count. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select player.name_first , player.name_last , player.player_id , count ( * ) from player join all_star on player.player_id = all_star.player_id group by player.player_id order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select player.name_first , player.name_last , player.player_id , count ( * ) from player join all_star on player.player_id = all_star.player_id group by player.player_id order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players enter hall of fame each year? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select yearid , count ( * ) from hall_of_fame group by yearid" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of players who enter hall of fame for each year. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select yearid , count ( * ) from hall_of_fame group by yearid" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of attendance at home games for each year? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select year , avg ( attendance ) from home_game group by year" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each year, return the year and the average number of attendance at home games. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select year , avg ( attendance ) from home_game group by year" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In 2014, what are the id and rank of the team that has the largest average number of attendance? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by avg ( _ ) desc limit _ | select team.team_id , team.rank from home_game join team on home_game.team_id = team.team_id where home_game.year = 2014 group by home_game.team_id order by avg ( home_game.attendance ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and rank of the team that has the highest average attendance rate in 2014. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by avg ( _ ) desc limit _ | select team.team_id , team.rank from home_game join team on home_game.team_id = team.team_id where home_game.year = 2014 group by home_game.team_id order by avg ( home_game.attendance ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the manager's first name, last name and id who won the most manager award? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select player.name_first , player.name_last , manager_award.player_id from player join manager_award on player.player_id = manager_award.player_id group by manager_award.player_id order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which manager won the most manager award? Give me the manager's first name, last name and id. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select player.name_first , player.name_last , manager_award.player_id from player join manager_award on player.player_id = manager_award.player_id group by manager_award.player_id order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many parks are there in the state of NY? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from park where state = 'NY'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show me the number of parks the state of NY has. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from park where state = 'NY'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which 3 players won the most player awards? List their full name and id. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select player.name_first , player.name_last , player.player_id from player join player_award on player.player_id = player_award.player_id group by player.player_id order by count ( * ) desc limit 3" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name, last name and id for the top three players won the most player awards. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select player.name_first , player.name_last , player.player_id from player join player_award on player.player_id = player_award.player_id group by player.player_id order by count ( * ) desc limit 3" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List three countries which are the origins of the least players. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select birth_country from player group by birth_country order by count ( * ) asc limit 3" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the three countries that the least players are from? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select birth_country from player group by birth_country order by count ( * ) asc limit 3" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the players' first name and last name who have empty death record. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select name_first , name_last from player where death_year = ''" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and last name of the players whose death record is empty? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select name_first , name_last from player where death_year = ''" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players born in USA are right-handed batters? That is, have the batter value 'R'. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from player where birth_country = 'USA' and bats = 'R'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of players who were born in USA and have bats information 'R'. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from player where birth_country = 'USA' and bats = 'R'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average height of the players from the college named 'Yale University'? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( player.height ) from player join player_college on player.player_id = player_college.player_id join college on college.college_id = player_college.college_id where college.name_full = 'Yale University'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average height of the players who belong to the college called 'Yale University'. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( player.height ) from player join player_college on player.player_id = player_college.player_id join college on college.college_id = player_college.college_id where college.name_full = 'Yale University'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the highest salary among each team? List the team name, id and maximum salary. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select team.name , team.team_id , max ( salary.salary ) from team join salary on team.team_id = salary.team_id group by team.team_id" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each team, return the team name, id and the maximum salary among the team. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ , max ( _ ) from _ group by _ | select team.name , team.team_id , max ( salary.salary ) from team join salary on team.team_id = salary.team_id group by team.team_id" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and id of the team offering the lowest average salary? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) asc limit _ | select team.name , team.team_id from team join salary on team.team_id = salary.team_id group by team.team_id order by avg ( salary.salary ) asc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which team offers the lowest average salary? Give me the name and id of the team. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) asc limit _ | select team.name , team.team_id from team join salary on team.team_id = salary.team_id group by team.team_id order by avg ( salary.salary ) asc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the players' first name and last name who won award both in 1960 and in 1961. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select player.name_first , player.name_last from player join player_award where player_award.year = 1960 intersect select player.name_first , player.name_last from player join player_award where player_award.year = 1961" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which players won awards in both 1960 and 1961? Return their first names and last names. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select player.name_first , player.name_last from player join player_award where player_award.year = 1960 intersect select player.name_first , player.name_last from player join player_award where player_award.year = 1961" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List players' first name and last name who have weight greater than 220 or height shorter than 75. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select name_first , name_last from player where weight > 220 or height < 75" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and last name of the players who have weight above 220 or height below 75? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ | select name_first , name_last from player where weight > 220 or height < 75" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the maximum scores of the team Boston Red Stockings when the team won in postseason? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( postseason.wins ) from postseason join team on postseason.team_id_winner = team.team_id_br where team.name = 'Boston Red Stockings'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum scores the team Boston Red Stockings got when the team won in postseason? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( postseason.wins ) from postseason join team on postseason.team_id_winner = team.team_id_br where team.name = 'Boston Red Stockings'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many times did Boston Red Stockings lose in 2009 postseason? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from postseason join team on postseason.team_id_loser = team.team_id_br where team.name = 'Boston Red Stockings' and postseason.year = 2009" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from postseason join team on postseason.team_id_loser = team.team_id_br where team.name = 'Boston Red Stockings' and postseason.year = 2009" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and id of the team with the most victories in 2008 postseason? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select team.name , postseason.team_id_winner from postseason join team on postseason.team_id_winner = team.team_id_br where postseason.year = 2008 group by postseason.team_id_winner order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and id of the team that won the most times in 2008 postseason. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select team.name , postseason.team_id_winner from postseason join team on postseason.team_id_winner = team.team_id_br where postseason.year = 2008 group by postseason.team_id_winner order by count ( * ) desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of wins the team Boston Red Stockings got in the postseasons each year in history? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , postseason.year from postseason join team on postseason.team_id_winner = team.team_id_br where team.name = 'Boston Red Stockings' group by postseason.year" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , postseason.year from postseason join team on postseason.team_id_winner = team.team_id_br where team.name = 'Boston Red Stockings' group by postseason.year" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of postseason games that team Boston Red Stockings participated in? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ where _ union select _ from _ where _ ) | select count ( * ) from ( select * from postseason join team on postseason.team_id_winner = team.team_id_br where team.name = 'Boston Red Stockings' union select * from postseason join team on postseason.team_id_loser = team.team_id_br where team.name = 'Boston Red Stockings' )" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many times in total did the team Boston Red Stockings participate in postseason games? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ where _ union select _ from _ where _ ) | select count ( * ) from ( select * from postseason join team on postseason.team_id_winner = team.team_id_br where team.name = 'Boston Red Stockings' union select * from postseason join team on postseason.team_id_loser = team.team_id_br where team.name = 'Boston Red Stockings' )" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from postseason where year = 1885 and ties = 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from postseason where year = 1885 and ties = 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total salary paid by team Boston Red Stockings in 2010? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( salary.salary ) from salary join team on salary.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and salary.year = 2010" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total salary expenses of team Boston Red Stockings in 2010? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( salary.salary ) from salary join team on salary.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and salary.year = 2010" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players were in the team Boston Red Stockings in 2000? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from salary join team on salary.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and salary.year = 2000" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players did Boston Red Stockings have in 2000? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from salary join team on salary.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and salary.year = 2000" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the 3 highest salaries of the players in 2001? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select salary from salary where year = 2001 order by salary desc limit 3" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How much salary did the top 3 well-paid players get in 2001? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select salary from salary where year = 2001 order by salary desc limit 3" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What were all the salary values of players in 2010 and 2001? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select salary from salary where year = 2010 union select salary from salary where year = 2001" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the salary values players received in 2010 and 2001. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select salary from salary where year = 2010 union select salary from salary where year = 2001" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which year did the least people enter hall of fame? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select yearid from hall_of_fame group by yearid order by count ( * ) asc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the year in which the least people enter hall of fame. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select yearid from hall_of_fame group by yearid order by count ( * ) asc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many parks are there in Atlanta city? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from park where city = 'Atlanta'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many parks does Atlanta city have? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from park where city = 'Atlanta'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games were played in park \"Columbia Park\" in 1907? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from home_game join park on home_game.park_id = park.park_id where home_game.year = 1907 and park.park_name = 'Columbia Park'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of games taken place in park \"Columbia Park\" in 1907. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from home_game join park on home_game.park_id = park.park_id where home_game.year = 1907 and park.park_name = 'Columbia Park'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games were played in city Atlanta in 2000? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from home_game join park on home_game.park_id = park.park_id where home_game.year = 2000 and park.city = 'Atlanta'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of games taken place in city Atlanta in 2000. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from home_game join park on home_game.park_id = park.park_id where home_game.year = 2000 and park.city = 'Atlanta'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ between _ and _ | select sum ( home_game.attendance ) from home_game join team on home_game.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and home_game.year between 2000 and 2010" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games in total did team Boston Red Stockings attend from 2000 to 2010? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ between _ and _ | select sum ( home_game.attendance ) from home_game join team on home_game.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and home_game.year between 2000 and 2010" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ between _ and _ | select sum ( salary.salary ) from salary join player on salary.player_id = player.player_id where player.name_first = 'Len' and player.name_last = 'Barker' and salary.year between 1985 and 1990" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ between _ and _ | select sum ( salary.salary ) from salary join player on salary.player_id = player.player_id where player.name_first = 'Len' and player.name_last = 'Barker' and salary.year between 1985 and 1990" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select player.name_first , player.name_last from salary join player on salary.player_id = player.player_id join team on team.team_id_br = salary.team_id where salary.year = 2005 and team.name = 'Washington Nationals' intersect select player.name_first , player.name_last from salary join player on salary.player_id = player.player_id join team on team.team_id_br = salary.team_id where salary.year = 2007 and team.name = 'Washington Nationals'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select player.name_first , player.name_last from salary join player on salary.player_id = player.player_id join team on team.team_id_br = salary.team_id where salary.year = 2005 and team.name = 'Washington Nationals' intersect select player.name_first , player.name_last from salary join player on salary.player_id = player.player_id join team on team.team_id_br = salary.team_id where salary.year = 2007 and team.name = 'Washington Nationals'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many home games did the team Boston Red Stockings play from 1990 to 2000 in total? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ between _ and _ | select sum ( home_game.games ) from home_game join team on home_game.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and home_game.year between 1990 and 2000" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of games the team Boston Red Stockings attended from 1990 to 2000. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ between _ and _ | select sum ( home_game.games ) from home_game join team on home_game.team_id = team.team_id_br where team.name = 'Boston Red Stockings' and home_game.year between 1990 and 2000" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which team had the least number of attendances in home games in 1980? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc limit _ | select team.name from home_game join team on home_game.team_id = team.team_id_br where home_game.year = 1980 order by home_game.attendance asc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the team that attended the least number of home games in 1980. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc limit _ | select team.name from home_game join team on home_game.team_id = team.team_id_br where home_game.year = 1980 order by home_game.attendance asc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of states that have more than 2 parks. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select state from park group by state having count ( * ) > 2" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which states have more than 2 parks? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select state from park group by state having count ( * ) > 2" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many team franchises are active, with active value 'Y'? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from team_franchise where active = 'Y'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of team franchises that are active (have 'Y' as \"active\" information). | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from team_franchise where active = 'Y'" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have 2 to 4 parks? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) between _ and _ | select city from park group by city having count ( * ) between 2 and 4" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the cities that have 2 to 4 parks. | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) between _ and _ | select city from park group by city having count ( * ) between 2 and 4" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which park had most attendances in 2008? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select park.park_name from home_game join park on home_game.park_id = park.park_id where home_game.year = 2008 order by home_game.attendance desc limit 1" }, { "db_id": "baseball_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which park did the most people attend in 2008? | all_star : player_id , year , game_num , game_id , team_id , league_id , gp , starting_pos | appearances : year , team_id , league_id , player_id , g_all , gs , g_batting , g_defense , g_p , g_c , g_1b , g_2b , g_3b , g_ss , g_lf , g_cf , g_rf , g_of , g_dh , g_ph , g_pr | manager_award : player_id , award_id , year , league_id , tie , notes | player_award : player_id , award_id , year , league_id , tie , notes | manager_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | player_award_vote : award_id , year , league_id , player_id , points_won , points_max , votes_first | batting : player_id , year , stint , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | batting_postseason : year , round , player_id , team_id , league_id , g , ab , r , h , double , triple , hr , rbi , sb , cs , bb , so , ibb , hbp , sh , sf , g_idp | player_college : player_id , college_id , year | fielding : player_id , year , stint , team_id , league_id , pos , g , gs , inn_outs , po , a , e , dp , pb , wp , sb , cs , zr | fielding_outfield : player_id , year , stint , glf , gcf , grf | fielding_postseason : player_id , year , team_id , league_id , round , pos , g , gs , inn_outs , po , a , e , dp , tp , pb , sb , cs | hall_of_fame : player_id , yearid , votedby , ballots , needed , votes , inducted , category , needed_note | home_game : year , league_id , team_id , park_id , span_first , span_last , games , openings , attendance | manager : player_id , year , team_id , league_id , inseason , g , w , l , rank , plyr_mgr | manager_half : player_id , year , team_id , league_id , inseason , half , g , w , l , rank | player : player_id , birth_year , birth_month , birth_day , birth_country , birth_state , birth_city , death_year , death_month , death_day , death_country , death_state , death_city , name_first , name_last , name_given , weight , height , bats , throws , debut , final_game , retro_id , bbref_id | park : park_id , park_name , park_alias , city , state , country | pitching : player_id , year , stint , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | pitching_postseason : player_id , year , round , team_id , league_id , w , l , g , gs , cg , sho , sv , ipouts , h , er , hr , bb , so , baopp , era , ibb , wp , hbp , bk , bfp , gf , r , sh , sf , g_idp | salary : year , team_id , league_id , player_id , salary | college : college_id , name_full , city , state , country | postseason : year , round , team_id_winner , league_id_winner , team_id_loser , league_id_loser , wins , losses , ties | team : year , league_id , team_id , franchise_id , div_id , rank , g , ghome , w , l , div_win , wc_win , lg_win , ws_win , r , ab , h , double , triple , hr , bb , so , sb , cs , hbp , sf , ra , er , era , cg , sho , sv , ipouts , ha , hra , bba , soa , e , dp , fp , name , park , attendance , bpf , ppf , team_id_br , team_id_lahman45 , team_id_retro | team_franchise : franchise_id , franchise_name , active , na_assoc | team_half : year , league_id , team_id , half , div_id , div_win , rank , g , w , l | all_star.player_id = player.player_id | appearances.player_id = player.player_id | appearances.team_id = team.team_id | manager_award.player_id = player.player_id | player_award.player_id = player.player_id | player_award_vote.player_id = player.player_id | batting.player_id = player.player_id | batting_postseason.team_id = team.team_id | batting_postseason.player_id = player.player_id | player_college.college_id = college.college_id | player_college.player_id = player.player_id | fielding.player_id = player.player_id | fielding_outfield.player_id = player.player_id | fielding_postseason.player_id = player.player_id | hall_of_fame.player_id = player.player_id | home_game.park_id = park.park_id | home_game.team_id = team.team_id | manager.team_id = team.team_id | manager_half.team_id = team.team_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select park.park_name from home_game join park on home_game.park_id = park.park_id where home_game.year = 2008 order by home_game.attendance desc limit 1" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many camera lenses have a focal length longer than 15 mm? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from camera_lens where focal_length_mm > 15" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the brand and name for each camera lens, and sort in descending order of maximum aperture. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select brand , name from camera_lens order by max_aperture desc" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the id, color scheme, and name for all the photos. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ | select id , color , name from photos" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and average height of the mountains? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect max ( _ ) , avg ( _ ) from _ | select max ( height ) , avg ( height ) from mountain" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average prominence of the mountains in country 'Morocco'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( prominence ) from mountain where country = 'Morocco'" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ where _ | select name , height , prominence from mountain where range != 'Aberdare Range'" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and name of the photos for mountains? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ where _ | select mountain.id , mountain.name from mountain join photos on mountain.id = photos.mountain_id where mountain.height > 4000" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and name of the mountains that have at least 2 photos? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select mountain.id , mountain.name from mountain join photos on mountain.id = photos.mountain_id group by mountain.id having count ( * ) >= 2" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the cameras that have taken picture of the most mountains? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select camera_lens.name from photos join camera_lens on photos.camera_lens_id = camera_lens.id group by camera_lens.id order by count ( * ) desc limit 1" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ where _ | select camera_lens.name from camera_lens join photos on photos.camera_lens_id = camera_lens.id where camera_lens.brand = 'Sigma' or camera_lens.brand = 'Olympus'" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different kinds of lens brands are there? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct brand ) from camera_lens" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many camera lenses are not used in taking any photos? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from camera_lens where id not in ( select camera_lens_id from photos )" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct photos.camera_lens_id ) from mountain join photos on mountain.id = photos.mountain_id where mountain.country = 'Ethiopia'" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif' | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select camera_lens.brand from mountain join photos on mountain.id = photos.mountain_id join camera_lens on photos.camera_lens_id = camera_lens.id where mountain.range = 'Toubkal Atlas' intersect select camera_lens.brand from mountain join photos on mountain.id = photos.mountain_id join camera_lens on photos.camera_lens_id = camera_lens.id where mountain.range = 'Lasta Massif'" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name , prominence from mountain except select mountain.name , mountain.prominence from mountain join photos on mountain.id = photos.mountain_id join camera_lens on photos.camera_lens_id = camera_lens.id where camera_lens.brand = 'Sigma'" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the camera lens names containing substring \"Digital\". | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from camera_lens where name like '%Digital%'" }, { "db_id": "mountain_photos", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. | mountain : id , name , height , prominence , range , country | camera_lens : id , brand , name , focal_length_mm , max_aperture | photos : id , camera_lens_id , mountain_id , color , name | photos.mountain_id = mountain.id | photos.camera_lens_id = camera_lens.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select camera_lens.name , count ( * ) from camera_lens join photos on camera_lens.id = photos.camera_lens_id group by camera_lens.id order by count ( * ) asc" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of channels that are not owned by CCTV. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select name from channel where owner != 'CCTV'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which channels are not owned by CCTV? Give me the channel names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select name from channel where owner != 'CCTV'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all channel names ordered by their rating in percent from big to small. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from channel order by rating_in_percent desc" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of all the channel names sorted by the channel rating in descending order. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from channel order by rating_in_percent desc" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the owner of the channel that has the highest rating ratio? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select owner from channel order by rating_in_percent desc limit 1" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show me the owner of the channel with the highest rating. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select owner from channel order by rating_in_percent desc limit 1" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many programs are there? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from program" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of programs. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from program" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list all the names of programs, ordering by launch time. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from program order by launch asc" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the list of program names, sorted by the order of launch date? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from program order by launch asc" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name, origin and owner of each program. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ | select name , origin , owner from program" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name, origin and owner of each program? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ | select name , origin , owner from program" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the name of the program that was launched most recently. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from program order by launch desc limit 1" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which program was launched most recently? Return the program name. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from program order by launch desc limit 1" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the total percentage share of all channels owned by CCTV. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( share_in_percent ) from channel where owner = 'CCTV'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total share (in percent) of all the channels owned by CCTV? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( share_in_percent ) from channel where owner = 'CCTV'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the channels that are broadcast in the morning. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which channels are broadcast in the morning? Give me the channel names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the names of the channels that broadcast in both morning and night? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning' intersect select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Night'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which channels broadcast both in the morning and at night? Give me the channel names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Morning' intersect select channel.name from channel join broadcast on channel.channel_id = broadcast.channel_id where broadcast.time_of_day = 'Night'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many programs are broadcast in each time section of the day? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , time_of_day from broadcast group by time_of_day" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of programs broadcast for each time section of a day. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , time_of_day from broadcast group by time_of_day" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the number of different programs that are broadcast during night time. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct program_id ) from broadcast where time_of_day = 'Night'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct programs are broadcast at \"Night\" time? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct program_id ) from broadcast where time_of_day = 'Night'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of programs that are never broadcasted in the morning. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from program except select program.name from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which programs are never broadcasted in the morning? Give me the names of the programs. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from program except select program.name from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the program owners that have some programs in both morning and night time. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning' intersect select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Night'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the owners of the programs that broadcast both in the morning and at night? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Morning' intersect select program.owner from program join broadcast on program.program_id = broadcast.program_id where broadcast.time_of_day = 'Night'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all program origins in the alphabetical order. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select origin from program order by origin asc" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the list of program origins ordered alphabetically? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select origin from program order by origin asc" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the number of different channel owners? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct owner ) from channel" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct channel owners. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct owner ) from channel" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the names of programs whose origin is not in Beijing. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select name from program where origin != 'Beijing'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which programs' origins are not \"Beijing\"? Give me the program names. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select name from program where origin != 'Beijing'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the channels owned by CCTV or HBS? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select name from channel where owner = 'CCTV' or owner = 'HBS'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all the channels owned by either CCTV or HBS | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ where _ | select name from channel where owner = 'CCTV' or owner = 'HBS'" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total rating ratio for each channel owner. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( rating_in_percent ) , owner from channel group by owner" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total rating of channel for each channel owner? | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( rating_in_percent ) , owner from channel group by owner" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the program that is broadcast most frequently. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select program.name from program join broadcast on program.program_id = broadcast.program_id group by broadcast.program_id order by count ( * ) desc limit 1" }, { "db_id": "program_share", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which program is broadcast most frequently? Give me the program name. | program : program_id , name , origin , launch , owner | channel : channel_id , name , owner , share_in_percent , rating_in_percent | broadcast : channel_id , program_id , time_of_day | broadcast_share : channel_id , program_id , date , share_in_percent | broadcast.program_id = program.program_id | broadcast.channel_id = channel.channel_id | broadcast_share.program_id = program.program_id | broadcast_share.channel_id = channel.channel_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select program.name from program join broadcast on program.program_id = broadcast.program_id group by broadcast.program_id order by count ( * ) desc limit 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses are there in total? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from courses" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of courses offered. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from courses" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the descriptions of the courses with name \"database\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select course_description from courses where course_name = 'database'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the description for the courses named \"database\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select course_description from courses where course_name = 'database'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the addresses of the course authors or tutors with personal name \"Cathrine\" | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select address_line_1 from course_authors_and_tutors where personal_name = 'Cathrine'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the addresses of the course authors or tutors whose personal name is \"Cathrine\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select address_line_1 from course_authors_and_tutors where personal_name = 'Cathrine'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the addresses of all the course authors or tutors. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select address_line_1 from course_authors_and_tutors" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the address of each course author or tutor? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select address_line_1 from course_authors_and_tutors" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the login names and family names of course author and tutors. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select login_name , family_name from course_authors_and_tutors" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the login names and family names of course author and tutors? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select login_name , family_name from course_authors_and_tutors" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the dates of enrollment and completion of students. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select date_of_enrolment , date_of_completion from student_course_enrolment" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the dates of enrollment and completion in record? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select date_of_enrolment , date_of_completion from student_course_enrolment" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct students are enrolled in courses? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct student_id ) from student_course_enrolment" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct students enrolled in courses. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct student_id ) from student_course_enrolment" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct courses are enrolled in by students? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( course_id ) from student_course_enrolment" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct courses that have enrolled students. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( course_id ) from student_course_enrolment" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the dates of the tests taken with result \"Pass\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select date_test_taken from student_tests_taken where test_result = 'Pass'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which tests have \"Pass\" results? Return the dates when the tests were taken. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select date_test_taken from student_tests_taken where test_result = 'Pass'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tests have result \"Fail\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student_tests_taken where test_result = 'Fail'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of tests with \"Fail\" result. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student_tests_taken where test_result = 'Fail'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the login names of the students with family name \"Ward\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select login_name from students where family_name = 'Ward'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the login names of the students whose family name is \"Ward\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select login_name from students where family_name = 'Ward'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_latest_logon from students where family_name = 'Jaskolski' or family_name = 'Langosh'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the latest logon date of the students whose family name is \"Jaskolski\" or \"Langosh\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_latest_logon from students where family_name = 'Jaskolski' or family_name = 'Langosh'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students have personal names that contain the word \"son\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from students where personal_name like '%son%'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students who have the word \"son\" in their personal names. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from students where personal_name like '%son%'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the subject names. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select subject_name from subjects" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the subjects. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ | select subject_name from subjects" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the information about course authors and tutors in alphabetical order of the personal name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from course_authors_and_tutors order by personal_name asc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the information about course authors and tutors in alphabetical order of the personal name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from course_authors_and_tutors order by personal_name asc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the personal names and family names of all the students in alphabetical order of family name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select personal_name , family_name from students order by family_name asc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the personal names and family names of the students? Sort the result in alphabetical order of the family name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select personal_name , family_name from students order by family_name asc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List each test result and its count in descending order of count. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select test_result , count ( * ) from student_tests_taken group by test_result order by count ( * ) desc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each distinct test result, find the number of students who got the result. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select test_result , count ( * ) from student_tests_taken group by test_result order by count ( * ) desc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the login name of the course author that teaches the course with name \"advanced database\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select course_authors_and_tutors.login_name from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id where courses.course_name = 'advanced database'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which course author teaches the \"advanced database\" course? Give me his or her login name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select course_authors_and_tutors.login_name from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id where courses.course_name = 'advanced database'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the addresses of the course authors who teach the course with name \"operating system\" or \"data structure\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select course_authors_and_tutors.address_line_1 from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id where courses.course_name = 'operating system' or courses.course_name = 'data structure'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the addresses of the course authors who teach either \"operating system\" or \"data structure\" course. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select course_authors_and_tutors.address_line_1 from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id where courses.course_name = 'operating system' or courses.course_name = 'data structure'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the personal name, family name, and author ID of the course author that teaches the most courses. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select course_authors_and_tutors.personal_name , course_authors_and_tutors.family_name , courses.author_id from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id group by courses.author_id order by count ( * ) desc limit 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the personal name, family name, and author ID of the course author who teaches the most courses? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select course_authors_and_tutors.personal_name , course_authors_and_tutors.family_name , courses.author_id from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id group by courses.author_id order by count ( * ) desc limit 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the addresses and author IDs of the course authors that teach at least two courses. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select course_authors_and_tutors.address_line_1 , courses.author_id from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id group by courses.author_id having count ( * ) >= 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which course authors teach two or more courses? Give me their addresses and author IDs. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select course_authors_and_tutors.address_line_1 , courses.author_id from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id group by courses.author_id having count ( * ) >= 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of courses taught by the tutor who has personal name \"Julio\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select courses.course_name from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id where course_authors_and_tutors.personal_name = 'Julio'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the courses taught by the tutor whose personal name is \"Julio\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select courses.course_name from course_authors_and_tutors join courses on course_authors_and_tutors.author_id = courses.author_id where course_authors_and_tutors.personal_name = 'Julio'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and descriptions of courses that belong to the subject named \"Computer Science\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select courses.course_name , courses.course_description from courses join subjects on courses.subject_id = subjects.subject_id where subjects.subject_name = 'Computer Science'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and descriptions of the all courses under the \"Computer Science\" subject? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select courses.course_name , courses.course_description from courses join subjects on courses.subject_id = subjects.subject_id where subjects.subject_name = 'Computer Science'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the subject ID, subject name, and the corresponding number of available courses for each subject. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select courses.subject_id , subjects.subject_name , count ( * ) from courses join subjects on courses.subject_id = subjects.subject_id group by courses.subject_id" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the subject ID, subject name, and the number of available courses for each subject? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select courses.subject_id , subjects.subject_name , count ( * ) from courses join subjects on courses.subject_id = subjects.subject_id group by courses.subject_id" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select courses.subject_id , subjects.subject_name , count ( * ) from courses join subjects on courses.subject_id = subjects.subject_id group by courses.subject_id order by count ( * ) asc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select courses.subject_id , subjects.subject_name , count ( * ) from courses join subjects on courses.subject_id = subjects.subject_id group by courses.subject_id order by count ( * ) asc" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the date of enrollment of the course named \"Spanish\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id where courses.course_name = 'Spanish'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the the date of enrollment of the \"Spanish\" course. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id where courses.course_name = 'Spanish'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the course that has the most student enrollment? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select courses.course_name from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name order by count ( * ) desc limit 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which course is enrolled in by the most students? Give me the course name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select courses.course_name from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name order by count ( * ) desc limit 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the courses that have exactly 1 student enrollment? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select courses.course_name from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name having count ( * ) = 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the courses that have just one student enrollment. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select courses.course_name from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name having count ( * ) = 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the descriptions and names of the courses that have student enrollment bigger than 2? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select courses.course_description , courses.course_name from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name having count ( * ) > 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the descriptions and names of the courses that have more than two students enrolled in. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select courses.course_description , courses.course_name from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name having count ( * ) > 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of each course and the corresponding number of student enrollment? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select courses.course_name , count ( * ) from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and the number of enrolled student for each course. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select courses.course_name , count ( * ) from courses join student_course_enrolment on courses.course_id = student_course_enrolment.course_id group by courses.course_name" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the enrollment dates of all the tests that have result \"Pass\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment from student_course_enrolment join student_tests_taken on student_course_enrolment.registration_id = student_tests_taken.registration_id where student_tests_taken.test_result = 'Pass'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the enrollment date for all the tests that have \"Pass\" result. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment from student_course_enrolment join student_tests_taken on student_course_enrolment.registration_id = student_tests_taken.registration_id where student_tests_taken.test_result = 'Pass'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the completion dates of all the tests that have result \"Fail\"? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_completion from student_course_enrolment join student_tests_taken on student_course_enrolment.registration_id = student_tests_taken.registration_id where student_tests_taken.test_result = 'Fail'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the completion date for all the tests that have \"Fail\" result. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_completion from student_course_enrolment join student_tests_taken on student_course_enrolment.registration_id = student_tests_taken.registration_id where student_tests_taken.test_result = 'Fail'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the dates of enrollment and completion of the student with personal name \"Karson\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment , student_course_enrolment.date_of_completion from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id where students.personal_name = 'Karson'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On what dates did the student whose personal name is \"Karson\" enroll in and complete the courses? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment , student_course_enrolment.date_of_completion from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id where students.personal_name = 'Karson'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the dates of enrollment and completion of the student with family name \"Zieme\" and personal name \"Bernie\". | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment , student_course_enrolment.date_of_completion from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id where students.family_name = 'Zieme' and students.personal_name = 'Bernie'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On what dates did the student with family name \"Zieme\" and personal name \"Bernie\" enroll in and complete the courses? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ where _ | select student_course_enrolment.date_of_enrolment , student_course_enrolment.date_of_completion from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id where students.family_name = 'Zieme' and students.personal_name = 'Bernie'" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the student ID and login name of the student with the most course enrollments | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select student_course_enrolment.student_id , students.login_name from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id group by student_course_enrolment.student_id order by count ( * ) desc limit 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the student ID and login name of the student who are enrolled in the most courses? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select student_course_enrolment.student_id , students.login_name from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id group by student_course_enrolment.student_id order by count ( * ) desc limit 1" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the student ID and personal name of the student with at least two enrollments. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select student_course_enrolment.student_id , students.personal_name from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id group by student_course_enrolment.student_id having count ( * ) >= 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which student are enrolled in at least two courses? Give me the student ID and personal name. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select student_course_enrolment.student_id , students.personal_name from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id group by student_course_enrolment.student_id having count ( * ) >= 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the student ID and middle name for all the students with at most two enrollments. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select student_course_enrolment.student_id , students.middle_name from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id group by student_course_enrolment.student_id having count ( * ) <= 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the student IDs and middle names of the students enrolled in at most two courses? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select student_course_enrolment.student_id , students.middle_name from student_course_enrolment join students on student_course_enrolment.student_id = students.student_id group by student_course_enrolment.student_id having count ( * ) <= 2" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the personal names of students not enrolled in any course. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select personal_name from students except select students.personal_name from students join student_course_enrolment on students.student_id = student_course_enrolment.student_id" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students not enrolled in any course? Find their personal names. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select personal_name from students except select students.personal_name from students join student_course_enrolment on students.student_id = student_course_enrolment.student_id" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students did not have any course enrollment? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from students where student_id not in ( select student_id from student_course_enrolment )" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of students who did not enroll in any course. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from students where student_id not in ( select student_id from student_course_enrolment )" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the common login name of course authors and students. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select login_name from course_authors_and_tutors intersect select login_name from students" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the login names used both by some course authors and some students? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select login_name from course_authors_and_tutors intersect select login_name from students" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the common personal name of course authors and students. | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select personal_name from course_authors_and_tutors intersect select personal_name from students" }, { "db_id": "e_learning", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the personal names used both by some course authors and some students? | course_authors_and_tutors : author_id , author_tutor_atb , login_name , password , personal_name , middle_name , family_name , gender_mf , address_line_1 | students : student_id , date_of_registration , date_of_latest_logon , login_name , password , personal_name , middle_name , family_name | subjects : subject_id , subject_name | courses : course_id , author_id , subject_id , course_name , course_description | student_course_enrolment : registration_id , student_id , course_id , date_of_enrolment , date_of_completion | student_tests_taken : registration_id , date_test_taken , test_result | courses.subject_id = subjects.subject_id | courses.author_id = course_authors_and_tutors.author_id | student_course_enrolment.student_id = students.student_id | student_course_enrolment.course_id = courses.course_id | student_tests_taken.registration_id = student_course_enrolment.registration_id | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select personal_name from course_authors_and_tutors intersect select personal_name from students" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ union select _ from _ where _ = ( select max ( _ ) from _ ) | select claims.date_claim_made , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id having count ( * ) > 2 union select claims.date_claim_made , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id where claims.amount_claimed = ( select max ( amount_claimed ) from claims )" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ union select _ from _ where _ = ( select max ( _ ) from _ ) | select claims.date_claim_made , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id having count ( * ) > 2 union select claims.date_claim_made , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id where claims.amount_claimed = ( select max ( amount_claimed ) from claims )" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer had at least 2 policies but did not file any claims? List the customer details and id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ except select _ from _ | select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id group by customers.customer_id having count ( * ) >= 2 except select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id join claims on customer_policies.policy_id = claims.policy_id" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the the customer details and id for the customers who had two or more policies but did not file any claims. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ except select _ from _ | select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id group by customers.customer_id having count ( * ) >= 2 except select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id join claims on customer_policies.policy_id = claims.policy_id" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the method, date and amount of all the payments, in ascending order of date. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select payment_method_code , date_payment_made , amount_payment from payments order by date_payment_made asc" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the method, date and amount of each payment? Sort the list in ascending order of date. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select payment_method_code , date_payment_made , amount_payment from payments order by date_payment_made asc" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select amount_settled , amount_claimed from claims order by amount_claimed desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select amount_settled , amount_claimed from claims order by amount_claimed desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select amount_settled , amount_claimed from claims order by amount_settled asc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select amount_settled , amount_claimed from claims order by amount_settled asc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select date_claim_made , date_claim_settled from claims where amount_claimed > ( select avg ( amount_claimed ) from claims )" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select date_claim_made , date_claim_settled from claims where amount_claimed > ( select avg ( amount_claimed ) from claims )" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ where _ <= ( select avg ( _ ) from _ ) | select date_claim_made from claims where amount_settled <= ( select avg ( amount_settled ) from claims )" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the claim start date for the claims whose claimed amount is no more than the average | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ where _ <= ( select avg ( _ ) from _ ) | select date_claim_made from claims where amount_settled <= ( select avg ( amount_settled ) from claims )" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many settlements does each claim correspond to? List the claim id and the number of settlements. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select claims.claim_id , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of settlements each claim corresponds to. Show the number together with the claim id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select claims.claim_id , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select claims.claim_id , claims.date_claim_made , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by count ( * ) desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select claims.claim_id , claims.date_claim_made , count ( * ) from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by count ( * ) desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by _ desc limit _ | select count ( * ) , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by claims.date_claim_settled desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the claim id and the number of settlements made for the claim with the most recent settlement date. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by _ desc limit _ | select count ( * ) , claims.claim_id from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id order by claims.date_claim_settled desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Of all the claims, what was the earliest date when any claim was made? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select date_claim_made from claims order by date_claim_made asc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the the date when the first claim was made. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select date_claim_made from claims order by date_claim_made asc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of settlement made for all the settlements? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount_settled ) from settlements" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the total amount of settlement across all the settlements. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount_settled ) from settlements" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the customers that had more than 1 policy? List the customer details and id. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id group by customers.customer_id having count ( * ) > 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the the customer details and id for the customers who had more than one policy. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select customers.customer_details , customers.customer_id from customers join customer_policies on customers.customer_id = customer_policies.customer_id group by customers.customer_id having count ( * ) > 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the claim dates and settlement dates of all the settlements? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ | select date_claim_made , date_claim_settled from settlements" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the the claim date and settlement date for each settlement case. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ | select date_claim_made , date_claim_settled from settlements" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most popular payment method? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which payment method is used the most often? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: With which kind of payment method were the least number of payments processed? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) asc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the payment method that were used the least often? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select payment_method_code from payments group by payment_method_code order by count ( * ) asc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of payment? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount_payment ) from payments" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the total amount of payment processed. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount_payment ) from payments" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the distinct details of the customers? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customer_details from customers" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the distinct customer details. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct customer_details from customers" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which kind of policy type was chosen by the most customers? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select policy_type_code from customer_policies group by policy_type_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the policy type the most customers choose. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select policy_type_code from customer_policies group by policy_type_code order by count ( * ) desc limit 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many settlements are there in total? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from settlements" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of settlements made. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from settlements" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which Payments were processed with Visa? List the payment Id, the date and the amount. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ where _ | select payment_id , date_payment_made , amount_payment from payments where payment_method_code = 'Visa'" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the payment Id, the date and the amount for all the payments processed with Visa. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ where _ | select payment_id , date_payment_made , amount_payment from payments where payment_method_code = 'Visa'" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the details of the customers who do not have any policies. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_details from customers except select customers.customer_details from customers join customer_policies on customers.customer_id = customer_policies.customer_id" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers do not have any policies? Find the details of these customers. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_details from customers except select customers.customer_details from customers join customer_policies on customers.customer_id = customer_policies.customer_id" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select claims.claim_id , claims.date_claim_made , claims.date_claim_settled from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id having count ( * ) = 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select claims.claim_id , claims.date_claim_made , claims.date_claim_settled from claims join settlements on claims.claim_id = settlements.claim_id group by claims.claim_id having count ( * ) = 1" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total claimed amount of all the claims. | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount_claimed ) from claims" }, { "db_id": "insurance_policies", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is total amount claimed summed across all the claims? | customers : customer_id , customer_details | customer_policies : policy_id , customer_id , policy_type_code , start_date , end_date | claims : claim_id , policy_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled | settlements : settlement_id , claim_id , date_claim_made , date_claim_settled , amount_claimed , amount_settled , customer_policy_id | payments : payment_id , settlement_id , payment_method_code , date_payment_made , amount_payment | customer_policies.customer_id = customers.customer_id | claims.policy_id = customer_policies.policy_id | settlements.claim_id = claims.claim_id | payments.settlement_id = settlements.settlement_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( amount_claimed ) from claims" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which department has the largest number of employees? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select name from department group by departmentid order by count ( departmentid ) desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the department with the most employees. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select name from department group by departmentid order by count ( departmentid ) desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the employee id of the head whose department has the least number of employees? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select head from department group by departmentid order by count ( departmentid ) asc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the employee id of the head of the department with the least employees. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select head from department group by departmentid order by count ( departmentid ) asc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the name and position of the head whose department has least number of employees? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select physician.name , physician.position from department join physician on department.head = physician.employeeid group by departmentid order by count ( departmentid ) asc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and position of the head of the department with the least employees. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select physician.name , physician.position from department join physician on department.head = physician.employeeid group by departmentid order by count ( departmentid ) asc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are names of patients who made an appointment? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ | select name from appointment join patient on appointment.patient = patient.ssn" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of patients who have made appointments. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ | select name from appointment join patient on appointment.patient = patient.ssn" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are name and phone number of patients who had more than one appointment? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select name , phone from appointment join patient on appointment.patient = patient.ssn group by appointment.patient having count ( * ) > 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which patients made more than one appointment? Tell me the name and phone number of these patients. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select name , phone from appointment join patient on appointment.patient = patient.ssn group by appointment.patient having count ( * ) > 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the appointment with the most recent start date? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select appointmentid from appointment order by start desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the appointment that started most recently? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select appointmentid from appointment order by start desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of physicians who took some appointment. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ | select physician.name from appointment join physician on appointment.physician = physician.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the physicians who took appointments. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ | select physician.name from appointment join physician on appointment.physician = physician.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of physicians who never took any appointment. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name from physician except select physician.name from appointment join physician on appointment.physician = physician.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which physicians have never taken any appointment? Find their names. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name from physician except select physician.name from appointment join physician on appointment.physician = physician.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all physicians and their primary affiliated departments' names. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician.name , department.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where affiliated_with.primaryaffiliation = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and primarily affiliated department name of each physician? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician.name , department.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where affiliated_with.primaryaffiliation = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the patient who made the most recent appointment? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select patient.name from patient join appointment on patient.ssn = appointment.patient order by appointment.start desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the patient who made the appointment with the most recent start date. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select patient.name from patient join appointment on patient.ssn = appointment.patient order by appointment.start desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many patients stay in room 112? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( patient ) from stay where room = 112" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of patients who stayed in room 112. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( patient ) from stay where room = 112" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many patients' prescriptions are made by physician John Dorian? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( patient.ssn ) from patient join prescribes on patient.ssn = prescribes.patient join physician on prescribes.physician = physician.employeeid where physician.name = 'John Dorian'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of patients' prescriptions physician John Dorian made. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( patient.ssn ) from patient join prescribes on patient.ssn = prescribes.patient join physician on prescribes.physician = physician.employeeid where physician.name = 'John Dorian'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of medication used on the patient who stays in room 111? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select medication.name from stay join patient on stay.patient = patient.ssn join prescribes on prescribes.patient = patient.ssn join medication on prescribes.medication = medication.code where room = 111" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the medication used for the patient staying in room 111? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select medication.name from stay join patient on stay.patient = patient.ssn join prescribes on prescribes.patient = patient.ssn join medication on prescribes.medication = medication.code where room = 111" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the patient who most recently stayed in room 111. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select patient from stay where room = 111 order by staystart desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the patient who stayed in room 111 most recently? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select patient from stay where room = 111 order by staystart desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the nurse has the most appointments? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nurse.name from nurse join appointment on nurse.employeeid = appointment.prepnurse group by nurse.employeeid order by count ( * ) desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the nurse who has the largest number of appointments. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select nurse.name from nurse join appointment on nurse.employeeid = appointment.prepnurse group by nurse.employeeid order by count ( * ) desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many patients do each physician take care of? List their names and number of patients they take care of. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select physician.name , count ( * ) from physician join patient on physician.employeeid = patient.pcp group by physician.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of each physician and the number of patients he or she treats. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select physician.name , count ( * ) from physician join patient on physician.employeeid = patient.pcp group by physician.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of physicians who are in charge of more than one patient. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select physician.name from physician join patient on physician.employeeid = patient.pcp group by physician.employeeid having count ( * ) > 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which physicians are in charge of more than one patient? Give me their names. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select physician.name from physician join patient on physician.employeeid = patient.pcp group by physician.employeeid having count ( * ) > 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms located on each block floor. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , block.blockfloor from block join room on block.blockfloor = room.blockfloor and block.blockcode = room.blockcode group by block.blockfloor" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms does each block floor have? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , block.blockfloor from block join room on block.blockfloor = room.blockfloor and block.blockcode = room.blockcode group by block.blockfloor" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of rooms for different block code? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , block.blockcode from block join room on block.blockfloor = room.blockfloor and block.blockcode = room.blockcode group by block.blockcode" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many rooms are located for each block code? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , block.blockcode from block join room on block.blockfloor = room.blockfloor and block.blockcode = room.blockcode group by block.blockcode" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the unique block codes that have available rooms? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct blockcode from room where unavailable = 0" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the distinct block codes where some rooms are available. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct blockcode from room where unavailable = 0" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different types of rooms are there? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct roomtype ) from room" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct room types available. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct roomtype ) from room" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the names of the physicians who prescribe medication Thesisin? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct physician.name from physician join prescribes on physician.employeeid = prescribes.physician join medication on medication.code = prescribes.medication where medication.name = 'Thesisin'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all the physicians who prescribe Thesisin as medication. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct physician.name from physician join prescribes on physician.employeeid = prescribes.physician join medication on medication.code = prescribes.medication where medication.name = 'Thesisin'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and position of physicians who prescribe some medication whose brand is X? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct physician.name , physician.position from physician join prescribes on physician.employeeid = prescribes.physician join medication on medication.code = prescribes.medication where medication.brand = 'X'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct physician.name , physician.position from physician join prescribes on physician.employeeid = prescribes.physician join medication on medication.code = prescribes.medication where medication.brand = 'X'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of medications prescribed for each brand. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , medication.name from medication join prescribes on medication.code = prescribes.medication group by medication.brand" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many medications are prescribed for each brand? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , medication.name from medication join prescribes on medication.code = prescribes.medication group by medication.brand" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of physicians whose position title contains the word 'senior'. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from physician where position like '%senior%'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the physicians who have 'senior' in their titles. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from physician where position like '%senior%'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the patient who has the most recent undergoing treatment? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select patient from undergoes order by dateundergoes asc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which patient is undergoing the most recent treatment? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select patient from undergoes order by dateundergoes asc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all patients who have an undergoing treatment and are staying in room 111. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct patient.name from undergoes join patient on undergoes.patient = patient.ssn join stay on undergoes.stay = stay.stayid where stay.room = 111" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of patients who are staying in room 111 and have an undergoing treatment? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct patient.name from undergoes join patient on undergoes.patient = patient.ssn join stay on undergoes.stay = stay.stayid where stay.room = 111" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct nurses ordered by alphabetical order? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from nurse order by name asc" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the alphabetically ordered list of all the distinct names of nurses? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from nurse order by name asc" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of nurses who are nursing an undergoing treatment. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ | select distinct nurse.name from undergoes join nurse on undergoes.assistingnurse = nurse.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which nurses are in charge of patients undergoing treatments? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ | select distinct nurse.name from undergoes join nurse on undergoes.assistingnurse = nurse.employeeid" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct medications, ordered in an alphabetical order. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from medication order by name asc" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the alphabetically ordered list of all distinct medications? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from medication order by name asc" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the physician who prescribed the highest dose? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select physician.name from physician join prescribes on physician.employeeid = prescribes.physician order by prescribes.dose desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the physician who prescribed the highest dose. What is his or her name? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select physician.name from physician join prescribes on physician.employeeid = prescribes.physician order by prescribes.dose desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the physicians' employee ids together with their primary affiliation departments' ids. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician , department from affiliated_with where primaryaffiliation = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are each physician's employee id and department id primarily affiliated. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician , department from affiliated_with where primaryaffiliation = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of departments where some physicians are primarily affiliated with. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct department.name from affiliated_with join department on affiliated_with.department = department.departmentid where primaryaffiliation = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of departments that have primarily affiliated physicians. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct department.name from affiliated_with join department on affiliated_with.department = department.departmentid where primaryaffiliation = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What nurses are on call with block floor 1 and block code 1? Tell me their names. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select nurse from on_call where blockfloor = 1 and blockcode = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of the nurses who are on call in block floor 1 and block code 1. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select nurse from on_call where blockfloor = 1 and blockcode = 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the highest cost, lowest cost and average cost of procedures? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( cost ) , min ( cost ) , avg ( cost ) from procedures" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the highest, lowest, and average cost of procedures. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( cost ) , min ( cost ) , avg ( cost ) from procedures" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and cost of all procedures sorted by the cost from the highest to the lowest. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , cost from procedures order by cost desc" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the list of names and costs of all procedures in the descending order of cost. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , cost from procedures order by cost desc" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the three most expensive procedures. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from procedures order by cost asc limit 3" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the three most costly procedures? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from procedures order by cost asc limit 3" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the physicians who are trained in a procedure that costs more than 5000. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where procedures.cost > 5000" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which physicians are trained in procedures that are more expensive than 5000? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where procedures.cost > 5000" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the physician who was trained in the most expensive procedure? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select physician.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment order by procedures.cost desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which physician was trained in the procedure that costs the most. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select physician.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment order by procedures.cost desc limit 1" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average cost of procedures that physician John Wen was trained in? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( procedures.cost ) from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the mean price of procedures physician John Wen was trained in. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( procedures.cost ) from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of procedures which physician John Wen was trained in. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of procedures physician John Wen was trained in? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all procedures which cost more than 1000 or which physician John Wen was trained in. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select name from procedures where cost > 1000 union select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the procedures that cost more than 1000 or are specialized in by physician John Wen? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select name from procedures where cost > 1000 union select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select name from procedures where cost > 1000 except select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Among the procedures that cost more than 1000, which were not specialized in by physician John Wen? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select name from procedures where cost > 1000 except select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select name from procedures where cost < 5000 intersect select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What procedures cost less than 5000 and have John Wen as a trained physician? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select name from procedures where cost < 5000 intersect select procedures.name from physician join trained_in on physician.employeeid = trained_in.physician join procedures on procedures.code = trained_in.treatment where physician.name = 'John Wen'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of physicians who are affiliated with both Surgery and Psychiatry departments. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select physician.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where department.name = 'Surgery' intersect select physician.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where department.name = 'Psychiatry'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select physician.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where department.name = 'Surgery' intersect select physician.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where department.name = 'Psychiatry'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of physicians who are affiliated with Surgery or Psychiatry department. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where department.name = 'Surgery' or department.name = 'Psychiatry'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ where _ | select physician.name from physician join affiliated_with on physician.employeeid = affiliated_with.physician join department on affiliated_with.department = department.departmentid where department.name = 'Surgery' or department.name = 'Psychiatry'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of patients who are not using the medication of Procrastin-X. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from patient except select patient.name from patient join prescribes on prescribes.patient = patient.ssn join medication on prescribes.medication = medication.code where medication.name = 'Procrastin-X'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of patients who are not taking the medication of Procrastin-X. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from patient except select patient.name from patient join prescribes on prescribes.patient = patient.ssn join medication on prescribes.medication = medication.code where medication.name = 'Procrastin-X'" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of patients who are not using the medication of Procrastin-X. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from patient where ssn not in ( select prescribes.patient from prescribes join medication on prescribes.medication = medication.code where medication.name = 'Procrastin-X' )" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many patients are not using Procrastin-X as medication? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from patient where ssn not in ( select prescribes.patient from prescribes join medication on prescribes.medication = medication.code where medication.name = 'Procrastin-X' )" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many appointments are there? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from appointment" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count how many appointments have been made in total. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from appointment" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of nurses who are on call. | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ | select distinct nurse.name from nurse join on_call on nurse.employeeid = on_call.nurse" }, { "db_id": "hospital_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of nurses on call? | physician : employeeid , name , position , ssn | department : departmentid , name , head | affiliated_with : physician , department , primaryaffiliation | procedures : code , name , cost | trained_in : physician , treatment , certificationdate , certificationexpires | patient : ssn , name , address , phone , insuranceid , pcp | nurse : employeeid , name , position , registered , ssn | appointment : appointmentid , patient , prepnurse , physician , start , end , examinationroom | medication : code , name , brand , description | prescribes : physician , patient , medication , date , appointment , dose | block : blockfloor , blockcode | room : roomnumber , roomtype , blockfloor , blockcode , unavailable | on_call : nurse , blockfloor , blockcode , oncallstart , oncallend | stay : stayid , patient , room , staystart , stayend | undergoes : patient , procedures , stay , dateundergoes , physician , assistingnurse | department.head = physician.employeeid | affiliated_with.department = department.departmentid | affiliated_with.physician = physician.employeeid | trained_in.treatment = procedures.code | trained_in.physician = physician.employeeid | patient.pcp = physician.employeeid | appointment.physician = physician.employeeid | appointment.prepnurse = nurse.employeeid | appointment.patient = patient.ssn | prescribes.appointment = appointment.appointmentid | prescribes.medication = medication.code | prescribes.patient = patient.ssn | prescribes.physician = physician.employeeid | room.blockfloor = block.blockfloor | room.blockcode = block.blockcode | on_call.blockfloor = block.blockfloor | on_call.blockcode = block.blockcode | on_call.nurse = nurse.employeeid | stay.room = room.roomnumber | stay.patient = patient.ssn | undergoes.assistingnurse = nurse.employeeid | undergoes.physician = physician.employeeid | undergoes.stay = stay.stayid | undergoes.procedures = procedures.code | undergoes.patient = patient.ssn | \n\n### Response:\n\nselect distinct _ from _ | select distinct nurse.name from nurse join on_call on nurse.employeeid = on_call.nurse" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many ships are there? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ship" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ship" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of ships in ascending order of tonnage. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from ship order by tonnage asc" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the names of the ships ordered by ascending tonnage? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from ship order by tonnage asc" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the type and nationality of ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ | select type , nationality from ship" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types and nationalities of every ship? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ | select type , nationality from ship" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of ships whose nationality is not \"United States\". | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select name from ship where nationality != 'United States'" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the ships that are not from the United States? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select name from ship where nationality != 'United States'" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of ships whose nationality is either United States or United Kingdom. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select name from ship where nationality = 'United States' or nationality = 'United Kingdom'" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the ships that are from either the US or the UK? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select name from ship where nationality = 'United States' or nationality = 'United Kingdom'" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the ship with the largest tonnage? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from ship order by tonnage desc limit 1" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the ship with the largest amount of tonnage called? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from ship order by tonnage desc limit 1" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different types of ships and the number of ships of each type. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select type , count ( * ) from ship group by type" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each type, how many ships are there? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select type , count ( * ) from ship group by type" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the most common type of ships. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select type from ship group by type order by count ( * ) desc limit 1" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common type of ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select type from ship group by type order by count ( * ) desc limit 1" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the nations that have more than two ships. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select nationality from ship group by nationality having count ( * ) > 2" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the nations that have more than two ships? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select nationality from ship group by nationality having count ( * ) > 2" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different types of ships and the average tonnage of ships of each type. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select type , avg ( tonnage ) from ship group by type" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each type, what is the average tonnage? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select type , avg ( tonnage ) from ship group by type" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show codes and fates of missions, and names of ships involved. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ | select mission.code , mission.fate , ship.name from mission join ship on mission.ship_id = ship.ship_id" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the mission codes, fates, and names of the ships involved? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ | select mission.code , mission.fate , ship.name from mission join ship on mission.ship_id = ship.ship_id" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of ships involved in a mission launched after 1928. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select ship.name from mission join ship on mission.ship_id = ship.ship_id where mission.launched_year > 1928" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of ships that were involved in a mission launched after 1928? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select ship.name from mission join ship on mission.ship_id = ship.ship_id where mission.launched_year > 1928" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct fate of missions that involve ships with nationality \"United States\" | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct mission.fate from mission join ship on mission.ship_id = ship.ship_id where ship.nationality = 'United States'" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different fates of the mission that involved ships from the United States? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct mission.fate from mission join ship on mission.ship_id = ship.ship_id where ship.nationality = 'United States'" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of ships that are not involved in any mission | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from ship where ship_id not in ( select ship_id from mission )" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the ships that are not involved in any missions? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from ship where ship_id not in ( select ship_id from mission )" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000. | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000" }, { "db_id": "ship_mission", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000? | mission : mission_id , ship_id , code , launched_year , location , speed_knots , fate | ship : ship_id , name , type , nationality , tonnage | mission.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students in total. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from list" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are there? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from list" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of students studying in room 111. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select lastname from list where classroom = 111" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of students in room 111? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select lastname from list where classroom = 111" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of students studying in room 108. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select firstname from list where classroom = 108" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of students in room 108? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select firstname from list where classroom = 108" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of students studying in room 107? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct firstname from list where classroom = 107" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first names of all the students in room 107. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct firstname from list where classroom = 107" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ | select distinct classroom , grade from list" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the grade number and classroom number of each class in the list? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ | select distinct classroom , grade from list" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which grade is studying in classroom 103? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct grade from list where classroom = 103" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the grade taught in classroom 103. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct grade from list where classroom = 103" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the grade studying in room 105. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct grade from list where classroom = 105" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which grade is studying in room 105? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct grade from list where classroom = 105" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which classrooms are used by grade 4? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct classroom from list where grade = 4" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the classrooms in which grade 4 is studying. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct classroom from list where grade = 4" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which classrooms are used by grade 5? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct classroom from list where grade = 5" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show me the classrooms grade 5 is using. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct classroom from list where grade = 5" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of the teachers that teach fifth grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct teachers.lastname from list join teachers on list.classroom = teachers.classroom where grade = 5" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the last names of the teachers who teach grade 5? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct teachers.lastname from list join teachers on list.classroom = teachers.classroom where grade = 5" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of the teachers that teach first grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct teachers.firstname from list join teachers on list.classroom = teachers.classroom where grade = 1" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of the teachers who teach grade 1? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct teachers.firstname from list join teachers on list.classroom = teachers.classroom where grade = 1" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of all the teachers that teach in classroom 110. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select firstname from teachers where classroom = 110" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which teachers teach in classroom 110? Give me their first names. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select firstname from teachers where classroom = 110" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of teachers teaching in classroom 109. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select lastname from teachers where classroom = 109" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which teachers teach in classroom 109? Give me their last names. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select lastname from teachers where classroom = 109" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the first name and last name of all the teachers. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ | select distinct firstname , lastname from teachers" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and last name of all the teachers? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ | select distinct firstname , lastname from teachers" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the first name and last name of all the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ | select distinct firstname , lastname from list" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each student's first name and last name. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ | select distinct firstname , lastname from list" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all students taught by OTHA MOYER. Output the first and last names of the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'OTHA' and teachers.lastname = 'MOYER'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'OTHA' and teachers.lastname = 'MOYER'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all students taught by MARROTTE KIRK. Output first and last names of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'MARROTTE' and teachers.lastname = 'KIRK'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which are the first and last names of the students taught by MARROTTE KIRK? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'MARROTTE' and teachers.lastname = 'KIRK'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of all the teachers that teach EVELINA BROMLEY. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'EVELINA' and list.lastname = 'BROMLEY'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'EVELINA' and list.lastname = 'BROMLEY'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of all the teachers that teach GELL TAMI. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'GELL' and list.lastname = 'TAMI'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of the teachers who teach the student called GELL TAMI? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ where _ | select teachers.lastname from list join teachers on list.classroom = teachers.classroom where list.firstname = 'GELL' and list.lastname = 'TAMI'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students does LORIA ONDERSMA teaches? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'LORIA' and teachers.lastname = 'ONDERSMA'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of students the teacher LORIA ONDERSMA teaches. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'LORIA' and teachers.lastname = 'ONDERSMA'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students does KAWA GORDON teaches? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'KAWA' and teachers.lastname = 'GORDON'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students taught by the teacher KAWA GORDON. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'KAWA' and teachers.lastname = 'GORDON'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students taught by TARRING LEIA. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'TARRING' and teachers.lastname = 'LEIA'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are taught by teacher TARRING LEIA? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'TARRING' and teachers.lastname = 'LEIA'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many teachers does the student named CHRISSY NABOZNY have? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'CHRISSY' and list.lastname = 'NABOZNY'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of teachers who teach the student called CHRISSY NABOZNY. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'CHRISSY' and list.lastname = 'NABOZNY'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many teachers does the student named MADLOCK RAY have? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'MADLOCK' and list.lastname = 'RAY'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of teachers who teach the student called MADLOCK RAY. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from list join teachers on list.classroom = teachers.classroom where list.firstname = 'MADLOCK' and list.lastname = 'RAY'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ except select _ from _ where _ | select distinct list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 1 except select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'OTHA' and teachers.lastname = 'MOYER'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ except select _ from _ where _ | select distinct list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 1 except select list.firstname , list.lastname from list join teachers on list.classroom = teachers.classroom where teachers.firstname = 'OTHA' and teachers.lastname = 'MOYER'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of the students in third grade that are not taught by COVIN JEROME. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 3 and teachers.firstname != 'COVIN' and teachers.lastname != 'JEROME'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct list.lastname from list join teachers on list.classroom = teachers.classroom where list.grade = 3 and teachers.firstname != 'COVIN' and teachers.lastname != 'JEROME'" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( distinct _ ) , count ( _ ) from _ group by _ | select grade , count ( distinct classroom ) , count ( * ) from list group by grade" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( distinct _ ) , count ( _ ) from _ group by _ | select grade , count ( distinct classroom ) , count ( * ) from list group by grade" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each classroom, report the classroom number and the number of grades using it. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select classroom , count ( distinct grade ) from list group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each classroom, show the classroom number and count the number of distinct grades that use the room. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select classroom , count ( distinct grade ) from list group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which classroom has the most students? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select classroom from list group by classroom order by count ( * ) desc limit 1" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the classroom that the most students use. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select classroom from list group by classroom order by count ( * ) desc limit 1" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the number of students in each classroom. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select classroom , count ( * ) from list group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each classroom, show the classroom number and find how many students are using it. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select classroom , count ( * ) from list group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each grade 0 classroom, report the total number of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '0' group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each grade 0 classroom, return the classroom number and the count of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '0' group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the total number of students for each fourth-grade classroom. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '4' group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each fourth-grade classroom, show the classroom number and the total number of students using it. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select classroom , count ( * ) from list where grade = '4' group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the teacher who teaches the largest number of students. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom group by teachers.firstname , teachers.lastname order by count ( * ) desc limit 1" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which teacher teaches the most students? Give me the first name and last name of the teacher. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select teachers.firstname , teachers.lastname from list join teachers on list.classroom = teachers.classroom group by teachers.firstname , teachers.lastname order by count ( * ) desc limit 1" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students in one classroom. | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , classroom from list group by classroom" }, { "db_id": "student_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students does one classroom have? | list : lastname , firstname , grade , classroom | teachers : lastname , firstname , classroom | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , classroom from list group by classroom" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many companies are headquartered in the US? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from company where headquarters = 'USA'" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of companies by ascending number of sales. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from company order by sales_in_billion asc" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the headquarters and industries of all companies? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ | select headquarters , industry from company" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of companies in the banking or retailing industry? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ where _ | select name from company where industry = 'Banking' or industry = 'Retailing'" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum and minimum market value of companies? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( market_value_in_billion ) , min ( market_value_in_billion ) from company" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the headquarter of the company with the largest sales? | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select headquarters from company order by sales_in_billion desc limit 1" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the different headquarters and number of companies at each headquarter. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select headquarters , count ( * ) from company group by headquarters" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common headquarter for companies. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select headquarters from company group by headquarters order by count ( * ) desc limit 1" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the headquarters that have at least two companies. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select headquarters from company group by headquarters having count ( * ) >= 2" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the headquarters that have both companies in banking industry and companies in oil and gas industry. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select headquarters from company where industry = 'Banking' intersect select headquarters from company where industry = 'Oil and gas'" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of companies and of employees. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ | select company.name , people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of companies and that of employees in descending order of number of years working for that employee. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select company.name , people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id order by employment.year_working asc" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of employees that work for companies with sales bigger than 200. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ where _ | select people.name from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id where company.sales_in_billion > 200" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of companies and the number of employees they have | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select company.name , count ( * ) from employment join people on employment.people_id = people.people_id join company on employment.company_id = company.company_id group by company.name" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of people that are not employed by any company | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from people where people_id not in ( select people_id from employment )" }, { "db_id": "company_employee", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list the names of the companies with more than 200 sales in the descending order of sales and profits. | people : people_id , age , name , nationality , graduation_college | company : company_id , name , headquarters , industry , sales_in_billion , profits_in_billion , assets_in_billion , market_value_in_billion | employment : company_id , people_id , year_working | employment.people_id = people.people_id | employment.company_id = company.company_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select name from company where sales_in_billion > 200 order by sales_in_billion , profits_in_billion desc" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many film are there? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from film" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from film" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct director of all films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct director from film" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different film Directors? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct director from film" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average ticket sales gross in dollars of films? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( gross_in_dollar ) from film" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average gross sales in dollars across all films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( gross_in_dollar ) from film" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the low and high estimates of film markets? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select low_estimate , high_estimate from film_market_estimation" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the low and high estimates for all film markets. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select low_estimate , high_estimate from film_market_estimation" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of film market estimations in year 1995? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ | select type from film_market_estimation where year = 1995" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the types of film market estimations in 1995. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ | select type from film_market_estimation where year = 1995" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum number of cities in all markets. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( number_cities ) , min ( number_cities ) from market" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the maximum and minimum number of cities across all markets. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( number_cities ) , min ( number_cities ) from market" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many markets have number of cities smaller than 300? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from market where number_cities < 300" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of markets that have a number of cities lower than 300. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from market where number_cities < 300" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all countries of markets in ascending alphabetical order. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select country from market order by country asc" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries for each market, ordered alphabetically? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select country from market order by country asc" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all countries of markets in descending order of number of cities. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select country from market order by number_cities desc" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries for each market ordered by decreasing number of cities? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select country from market order by number_cities desc" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the titles of films and the types of market estimations. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select film.title , film_market_estimation.type from film join film_market_estimation on film.film_id = film_market_estimation.film_id" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of films and corresponding types of market estimations? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select film.title , film_market_estimation.type from film join film_market_estimation on film.film_id = film_market_estimation.film_id" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct director of films with market estimation in the year of 1995. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct film.director from film join film_market_estimation on film.film_id = film_market_estimation.film_id where film_market_estimation.year = 1995" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the different directors of films which had market estimation in 1995? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct film.director from film join film_market_estimation on film.film_id = film_market_estimation.film_id where film_market_estimation.year = 1995" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of cities of markets with low film market estimate bigger than 10000? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( market.number_cities ) from film_market_estimation join market on film_market_estimation.market_id = market.market_id where film_market_estimation.low_estimate > 10000" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the average number of cities within markets that had a low market estimation larger than 10000? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( market.number_cities ) from film_market_estimation join market on film_market_estimation.market_id = market.market_id where film_market_estimation.low_estimate > 10000" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list the countries and years of film market estimations. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select market.country , film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries of markets and their corresponding years of market estimation? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ | select market.country , film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list the years of film market estimations when the market is in country \"Japan\" in descending order. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id where market.country = 'Japan' order by film_market_estimation.year desc" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the years of film market estimation for the market of Japan, ordered by year descending? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select film_market_estimation.year from film_market_estimation join market on film_market_estimation.market_id = market.market_id where market.country = 'Japan' order by film_market_estimation.year desc" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the studios of each film and the number of films produced by that studio. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select studio , count ( * ) from film group by studio" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How films are produced by each studio? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select studio , count ( * ) from film group by studio" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of film studio that have the most number of films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select studio from film group by studio order by count ( * ) desc limit 1" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of teh studio that created the most films? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select studio from film group by studio order by count ( * ) desc limit 1" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of studios that have at least two films. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select studio from film group by studio having count ( * ) >= 2" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of studios that have made two or more films? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select studio from film group by studio having count ( * ) >= 2" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the title of films that do not have any market estimation. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from film where film_id not in ( select film_id from film_market_estimation )" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of films that do not have a film market estimation? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select title from film where film_id not in ( select film_id from film_market_estimation )" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the studios that have produced films with director \"Nicholas Meyer\" and \"Walter Hill\". | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select studio from film where director = 'Nicholas Meyer' intersect select studio from film where director = 'Walter Hill'" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select studio from film where director = 'Nicholas Meyer' intersect select studio from film where director = 'Walter Hill'" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the titles and studios of the films that are produced by some film studios that contained the word \"Universal\". | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select title , studio from film where studio like '%Universal%'" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles and studios of films that have been produced by a studio whose name contains \"Universal\"? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select title , studio from film where studio like '%Universal%'" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the studios that have not produced films with director \"Walter Hill\". | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select studio from film except select studio from film where director = 'Walter Hill'" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which studios have never worked with the director Walter Hill? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select studio from film except select studio from film where director = 'Walter Hill'" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the studios which average gross is above 4500000. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) >= _ | select studio from film group by studio having avg ( gross_in_dollar ) >= 4500000" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which studios have an average gross of over 4500000? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) >= _ | select studio from film group by studio having avg ( gross_in_dollar ) >= 4500000" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title of the film that has the highest high market estimation. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select film.title from film join film_market_estimation on film.film_id = film_market_estimation.film_id order by high_estimate desc limit 1" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the title of the film with the highest high estimate? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select film.title from film join film_market_estimation on film.film_id = film_market_estimation.film_id order by high_estimate desc limit 1" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles and directors of the films were never presented in China? | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select title , director from film where film_id not in ( select film_id from film_market_estimation join market on film_market_estimation.market_id = market.market_id where country = 'China' )" }, { "db_id": "film_rank", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the titles and directors of films that were never in the market of China. | film : film_id , title , studio , director , gross_in_dollar | market : market_id , country , number_cities | film_market_estimation : estimation_id , low_estimate , high_estimate , film_id , type , market_id , year | film_market_estimation.market_id = market.market_id | film_market_estimation.film_id = film.film_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select title , director from film where film_id not in ( select film_id from film_market_estimation join market on film_market_estimation.market_id = market.market_id where country = 'China' )" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many calendar items do we have? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_calendar" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of all the calendar items. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_calendar" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all calendar dates and day Numbers. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select calendar_date , day_number from ref_calendar" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the calendar dates and day Numbers? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select calendar_date , day_number from ref_calendar" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of document types. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_document_types" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many document types are there? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_document_types" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all document type codes and document type names. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select document_type_code , document_type_name from ref_document_types" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the document type codes and document type names? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select document_type_code , document_type_name from ref_document_types" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and description for document type code RV? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_name , document_type_description from ref_document_types where document_type_code = 'RV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the name and description of the document type code RV. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_name , document_type_description from ref_document_types where document_type_code = 'RV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the document type code for document type \"Paper\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_code from ref_document_types where document_type_name = 'Paper'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the code of the document type \"Paper\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_code from ref_document_types where document_type_name = 'Paper'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of documents with document type code CV or BK. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from all_documents where document_type_code = 'CV' or document_type_code = 'BK'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents have document type code CV or BK? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from all_documents where document_type_code = 'CV' or document_type_code = 'BK'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the date when the document \"Marry CV\" was stored? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select date_stored from all_documents where document_name = 'Marry CV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When was the document named \"Marry CV\" stored? Give me the date. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select date_stored from all_documents where document_name = 'Marry CV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the day Number and date of all the documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select ref_calendar.day_number , all_documents.date_stored from all_documents join ref_calendar on all_documents.date_stored = ref_calendar.calendar_date" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the day Number and stored date for all the documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select ref_calendar.day_number , all_documents.date_stored from all_documents join ref_calendar on all_documents.date_stored = ref_calendar.calendar_date" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the document type name for the document with name \"How to read a book\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_document_types.document_type_name from all_documents join ref_document_types on all_documents.document_type_code = ref_document_types.document_type_code where all_documents.document_name = 'How to read a book'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the document type name of the document named \"How to read a book\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_document_types.document_type_name from all_documents join ref_document_types on all_documents.document_type_code = ref_document_types.document_type_code where all_documents.document_name = 'How to read a book'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of locations. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many locations are listed in the database? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all location codes and location names. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select location_code , location_name from ref_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the location codes and location names? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select location_code , location_name from ref_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and description for location code x? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select location_name , location_description from ref_locations where location_code = 'x'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the name and description of the location with code x. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select location_name , location_description from ref_locations where location_code = 'x'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location code for the country \"Canada\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select location_code from ref_locations where location_name = 'Canada'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the location code of the country \"Canada\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select location_code from ref_locations where location_name = 'Canada'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many roles are there? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from roles" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of roles listed. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from roles" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all role codes, role names, and role descriptions. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select role_code , role_name , role_description from roles" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the role codes, role names, and role descriptions? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select role_code , role_name , role_description from roles" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and description for role code \"MG\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select role_name , role_description from roles where role_code = 'MG'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and description of the role with code \"MG\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select role_name , role_description from roles where role_code = 'MG'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the description for role name \"Proof Reader\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select role_description from roles where role_name = 'Proof Reader'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the role named \"Proof Reader\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select role_description from roles where role_name = 'Proof Reader'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees do we have? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from employees" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of employees we have. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from employees" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, role code, and date of birth for the employee with name 'Armani'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employee_name , role_code , date_of_birth from employees where employee_name = 'Armani'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name, role code, and date of birth of the employee named 'Armani'? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employee_name , role_code , date_of_birth from employees where employee_name = 'Armani'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id for the employee called Ebba? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employee_id from employees where employee_name = 'Ebba'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id of the employee named Ebba. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employee_id from employees where employee_name = 'Ebba'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of all the employees with role \"HR\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employee_name from employees where role_code = 'HR'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which employees have the role with code \"HR\"? Find their names. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employee_name from employees where role_code = 'HR'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all role codes and the number of employees in each role. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select role_code , count ( * ) from employees group by role_code" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the code of each role and the number of employees in each role? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select role_code , count ( * ) from employees group by role_code" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the role code with the largest number of employees? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select role_code from employees group by role_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the code of the role that have the most employees. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select role_code from employees group by role_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all role codes with at least 3 employees. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select role_code from employees group by role_code having count ( * ) >= 3" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the roles with three or more employees? Give me the role codes. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select role_code from employees group by role_code having count ( * ) >= 3" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the role code with the least employees. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select role_code from employees group by role_code order by count ( * ) asc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the role with the smallest number of employees? Find the role codes. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select role_code from employees group by role_code order by count ( * ) asc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the role name and role description for employee called Ebba? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select roles.role_name , roles.role_description from employees join roles on employees.role_code = roles.role_code where employees.employee_name = 'Ebba'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and description of the role played by the employee named Ebba. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select roles.role_name , roles.role_description from employees join roles on employees.role_code = roles.role_code where employees.employee_name = 'Ebba'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of employees with role name Editor. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.employee_name from employees join roles on employees.role_code = roles.role_code where roles.role_name = 'Editor'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all the employees whose the role name is \"Editor\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.employee_name from employees join roles on employees.role_code = roles.role_code where roles.role_name = 'Editor'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the employee ids for all employees with role name \"Human Resource\" or \"Manager\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.employee_id from employees join roles on employees.role_code = roles.role_code where roles.role_name = 'Human Resource' or roles.role_name = 'Manager'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the employee ids of the employees whose role name is \"Human Resource\" or \"Manager\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select employees.employee_id from employees join roles on employees.role_code = roles.role_code where roles.role_name = 'Human Resource' or roles.role_name = 'Manager'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different location codes for documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location_code from document_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me all the distinct location codes for documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location_code from document_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the location name for document \"Robin CV\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_locations.location_name from all_documents join document_locations on all_documents.document_id = document_locations.document_id join ref_locations on document_locations.location_code = ref_locations.location_code where all_documents.document_name = 'Robin CV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location name of the document \"Robin CV\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_locations.location_name from all_documents join document_locations on all_documents.document_id = document_locations.document_id join ref_locations on document_locations.location_code = ref_locations.location_code where all_documents.document_name = 'Robin CV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the location code, the starting date and ending data in that location for all the documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select location_code , date_in_location_from , date_in_locaton_to from document_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are each document's location code, and starting date and ending data in that location? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select location_code , date_in_location_from , date_in_locaton_to from document_locations" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is \"the date in location from\" and \"the date in location to\" for the document with name \"Robin CV\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select document_locations.date_in_location_from , document_locations.date_in_locaton_to from document_locations join all_documents on document_locations.document_id = all_documents.document_id where all_documents.document_name = 'Robin CV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the starting date and ending data in location for the document named \"Robin CV\". | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ where _ | select document_locations.date_in_location_from , document_locations.date_in_locaton_to from document_locations join all_documents on document_locations.document_id = all_documents.document_id where all_documents.document_name = 'Robin CV'" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the location codes and the number of documents in each location. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select location_code , count ( * ) from document_locations group by location_code" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the code of each location and the number of documents in that location? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select location_code , count ( * ) from document_locations group by location_code" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location code with the most documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select location_code from document_locations group by location_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the code of the location with the largest number of documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select location_code from document_locations group by location_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the location codes with at least 3 documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select location_code from document_locations group by location_code having count ( * ) >= 3" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes of the locations with at least three documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select location_code from document_locations group by location_code having count ( * ) >= 3" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the location name and code with the least documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select ref_locations.location_name , document_locations.location_code from document_locations join ref_locations on document_locations.location_code = ref_locations.location_code group by document_locations.location_code order by count ( * ) asc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and code of the location with the smallest number of documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select ref_locations.location_name , document_locations.location_code from document_locations join ref_locations on document_locations.location_code = ref_locations.location_code group by document_locations.location_code order by count ( * ) asc limit 1" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select employees.employee_name , employees.employee_name from documents_to_be_destroyed join employees on documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id join employees on documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ | select employees.employee_name , employees.employee_name from documents_to_be_destroyed join employees on documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id join employees on documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id of each employee and the number of document destruction authorised by that employee. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select destruction_authorised_by_employee_id , count ( * ) from documents_to_be_destroyed group by destruction_authorised_by_employee_id" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id of each employee and the number of document destruction authorised by that employee? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select destruction_authorised_by_employee_id , count ( * ) from documents_to_be_destroyed group by destruction_authorised_by_employee_id" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the employee ids and the number of documents destroyed by each employee. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select destroyed_by_employee_id , count ( * ) from documents_to_be_destroyed group by destroyed_by_employee_id" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id of each employee and the number of document destroyed by that employee? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select destroyed_by_employee_id , count ( * ) from documents_to_be_destroyed group by destroyed_by_employee_id" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of the employees who don't authorize destruction for any document. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select employee_id from employees except select destruction_authorised_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which employees do not authorize destruction for any document? Give me their employee ids. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select employee_id from employees except select destruction_authorised_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of all employees who have authorized destruction. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct destruction_authorised_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all the employees who authorize document destruction? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct destruction_authorised_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of all employees who have destroyed a document. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct destroyed_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all the employees who have destroyed documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct destroyed_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of all employees who don't destroy any document. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select employee_id from employees except select destroyed_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which employees do not destroy any document? Find their employee ids. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select employee_id from employees except select destroyed_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of all employees who have either destroyed a document or made an authorization to do this. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select destroyed_by_employee_id from documents_to_be_destroyed union select destruction_authorised_by_employee_id from documents_to_be_destroyed" }, { "db_id": "cre_Doc_Tracking_DB", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which employees have either destroyed a document or made an authorization to do so? Return their employee ids. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_calendar : calendar_date , day_number | ref_locations : location_code , location_name , location_description | roles : role_code , role_name , role_description | all_documents : document_id , date_stored , document_type_code , document_name , document_description , other_details | employees : employee_id , role_code , employee_name , gender_mfu , date_of_birth , other_details | document_locations : document_id , location_code , date_in_location_from , date_in_locaton_to | documents_to_be_destroyed : document_id , destruction_authorised_by_employee_id , destroyed_by_employee_id , planned_destruction_date , actual_destruction_date , other_details | all_documents.date_stored = ref_calendar.calendar_date | all_documents.document_type_code = ref_document_types.document_type_code | employees.role_code = roles.role_code | document_locations.document_id = all_documents.document_id | document_locations.date_in_locaton_to = ref_calendar.calendar_date | document_locations.date_in_location_from = ref_calendar.calendar_date | document_locations.location_code = ref_locations.location_code | documents_to_be_destroyed.document_id = all_documents.document_id | documents_to_be_destroyed.actual_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.planned_destruction_date = ref_calendar.calendar_date | documents_to_be_destroyed.destruction_authorised_by_employee_id = employees.employee_id | documents_to_be_destroyed.destroyed_by_employee_id = employees.employee_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select destroyed_by_employee_id from documents_to_be_destroyed union select destruction_authorised_by_employee_id from documents_to_be_destroyed" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many clubs are there? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from club" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of clubs. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from club" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all clubs? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select clubname from club" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the name of each club. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select clubname from club" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are there? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all the students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct fname from student" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find each student's first name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct fname from student" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of the members of the club \"Bootup Baltimore\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the members of the club named \"Bootup Baltimore\"? Give me their last names. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the members of the club named \"Hopkins Student Enterprises\"? Show the last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the last name for the members of the club named \"Hopkins Student Enterprises\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many members does the club \"Tennis Club\" has? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Tennis Club'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the members of the club \"Tennis Club\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Tennis Club'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of members of club \"Pen and Paper Gaming\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Pen and Paper Gaming'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many people have membership in the club \"Pen and Paper Gaming\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Pen and Paper Gaming'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many clubs does \"Linda Smith\" belong to? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Linda' and student.lname = 'Smith'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many clubs does \"Linda Smith\" have membership for? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Linda' and student.lname = 'Smith'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of clubs where \"Tracy Kim\" is a member. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Tracy' and student.lname = 'Kim'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For how many clubs is \"Tracy Kim\" a member? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Tracy' and student.lname = 'Kim'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the female members of club \"Bootup Baltimore\". Show the first name and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.sex = 'F'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the first name and last name for all the female members of the club \"Bootup Baltimore\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.sex = 'F'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the male members of club \"Hopkins Student Enterprises\". Show the first name and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises' and student.sex = 'M'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and last name of each male member in club \"Hopkins Student Enterprises\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises' and student.sex = 'M'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all members of \"Bootup Baltimore\" whose major is \"600\". Show the first name and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.major = '600'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which members of \"Bootup Baltimore\" major in \"600\"? Give me their first names and last names. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.major = '600'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which club has the most members majoring in \"600\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.major = '600' group by club.clubname order by count ( * ) desc limit 1" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the club which has the largest number of members majoring in \"600\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.major = '600' group by club.clubname order by count ( * ) desc limit 1" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the club that has the most female students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.sex = 'F' group by club.clubname order by count ( * ) desc limit 1" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which club has the most female students as their members? Give me the name of the club. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.sex = 'F' group by club.clubname order by count ( * ) desc limit 1" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the club named \"Tennis Club\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clubdesc from club where clubname = 'Tennis Club'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the description of the club called \"Tennis Club\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clubdesc from club where clubname = 'Tennis Club'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the description of the club \"Pen and Paper Gaming\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clubdesc from club where clubname = 'Pen and Paper Gaming'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the club \"Pen and Paper Gaming\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clubdesc from club where clubname = 'Pen and Paper Gaming'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location of the club named \"Tennis Club\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clublocation from club where clubname = 'Tennis Club'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where us the club named \"Tennis Club\" located? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clublocation from club where clubname = 'Tennis Club'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the location of the club \"Pen and Paper Gaming\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clublocation from club where clubname = 'Pen and Paper Gaming'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where is the club \"Pen and Paper Gaming\" located? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clublocation from club where clubname = 'Pen and Paper Gaming'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where is the club \"Hopkins Student Enterprises\" located? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clublocation from club where clubname = 'Hopkins Student Enterprises'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the location of the club \"Hopkins Student Enterprises\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clublocation from club where clubname = 'Hopkins Student Enterprises'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of all the clubs at \"AKW\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clubname from club where clublocation = 'AKW'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which clubs are located at \"AKW\"? Return the club names. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select clubname from club where clublocation = 'AKW'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many clubs are located at \"HHH\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club where clublocation = 'HHH'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of clubs located at \"HHH\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club where clublocation = 'HHH'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last name of the president of the club \"Bootup Baltimore\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and member_of_club.position = 'President'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the president of the club \"Bootup Baltimore\"? Give me the first and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and member_of_club.position = 'President'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the first name and last name. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises' and member_of_club.position = 'CTO'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and last name for the \"CTO\" of the club \"Hopkins Student Enterprises\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises' and member_of_club.position = 'CTO'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different roles are there in the club \"Bootup Baltimore\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct member_of_club.position ) from club join member_of_club on club.clubid = member_of_club.clubid where club.clubname = 'Bootup Baltimore'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different positions in the club \"Bootup Baltimore\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct member_of_club.position ) from club join member_of_club on club.clubid = member_of_club.clubid where club.clubname = 'Bootup Baltimore'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many members of \"Bootup Baltimore\" are older than 18? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age > 18" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of members in club \"Bootup Baltimore\" whose age is above 18. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age > 18" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many members of club \"Bootup Baltimore\" are younger than 18? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age < 18" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of members in club \"Bootup Baltimore\" whose age is below 18. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore' and student.age < 18" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all the clubs that have at least a member from the city with city code \"BAL\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'BAL'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which clubs have one or more members from the city with code \"BAL\"? Give me the names of the clubs. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'BAL'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the clubs that have at least a member from the city with city code \"HOU\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'HOU'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which clubs have one or more members from the city with code \"HOU\"? Give me the names of the clubs. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.city_code = 'HOU'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many clubs does the student named \"Eric Tai\" belong to? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct club.clubname ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Eric' and student.lname = 'Tai'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of clubs for which the student named \"Eric Tai\" is a member. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct club.clubname ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Eric' and student.lname = 'Tai'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the clubs having \"Davis Steven\" as a member. | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Davis' and student.lname = 'Steven'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the clubs that have \"Davis Steven\" as a member? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.fname = 'Davis' and student.lname = 'Steven'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the clubs that have at least a member with advisor \"1121\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.advisor = 1121" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which clubs have one or more members whose advisor is \"1121\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct club.clubname from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where student.advisor = 1121" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age of the members of the club \"Bootup Baltimore\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of the members in the club \"Bootup Baltimore\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Bootup Baltimore'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of members of the club \"Hopkins Student Enterprises\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On average, how old are the members in the club \"Hopkins Student Enterprises\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Hopkins Student Enterprises'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Retrieve the average age of members of the club \"Tennis Club\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Tennis Club'" }, { "db_id": "club_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average age of the members in the club \"Tennis Club\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | club : clubid , clubname , clubdesc , clublocation | member_of_club : stuid , clubid , position | member_of_club.clubid = club.clubid | member_of_club.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from club join member_of_club on club.clubid = member_of_club.clubid join student on member_of_club.stuid = student.stuid where club.clubname = 'Tennis Club'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select grants.grant_amount from grants join documents on grants.grant_id = documents.grant_id where documents.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select grants.grant_amount from grants join documents on grants.grant_id = documents.grant_id where documents.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the project details of the project both producing patent and paper as outcomes. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Paper' intersect select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Patent'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of the project that is producing both patents and papers as outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Paper' intersect select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id where project_outcomes.outcome_code = 'Patent'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total grant amount of the organisations described as research? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( grant_amount ) from grants join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Research'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of grant money for research? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( grant_amount ) from grants join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Research'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List from which date and to which date these staff work: project staff of the project which hires the most staffs | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ group by _ order by count ( _ ) desc limit _ ) union select _ from _ where _ | select date_from , date_to from project_staff where project_id in ( select project_id from project_staff group by project_id order by count ( * ) desc limit 1 ) union select date_from , date_to from project_staff where role_code = 'leader'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ group by _ order by count ( _ ) desc limit _ ) union select _ from _ where _ | select date_from , date_to from project_staff where project_id in ( select project_id from project_staff group by project_id order by count ( * ) desc limit 1 ) union select date_from , date_to from project_staff where role_code = 'leader'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the organisation ids and details of the organisations which are involved in | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select organisations.organisation_id , organisations.organisation_details from grants join organisations on grants.organisation_id = organisations.organisation_id group by organisations.organisation_id having sum ( grants.grant_amount ) > 6000" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and details for all organizations that have grants of more than 6000 dollars? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select organisations.organisation_id , organisations.organisation_details from grants join organisations on grants.organisation_id = organisations.organisation_id group by organisations.organisation_id having sum ( grants.grant_amount ) > 6000" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the organisation type and id of the organisation which has the most number of research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organisations.organisation_type , organisations.organisation_id from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type and id of the organization that has the most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organisations.organisation_type , organisations.organisation_id from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which organisation type hires most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organisations.organisation_type from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_type order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of the organization with the most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organisations.organisation_type from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_type order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select documents.sent_date from documents join grants on documents.grant_id = grants.grant_id join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where grants.grant_amount > 5000 and organisation_types.organisation_type_description = 'Research'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select documents.sent_date from documents join grants on documents.grant_id = grants.grant_id join organisations on grants.organisation_id = organisations.organisation_id join organisation_types on organisations.organisation_type = organisation_types.organisation_type where grants.grant_amount > 5000 and organisation_types.organisation_type_description = 'Research'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the response received dates for the documents described as 'Regular' or granted with more than 100? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select documents.response_received_date from documents join document_types on documents.document_type_code = document_types.document_type_code join grants on documents.grant_id = grants.grant_id where document_types.document_description = 'Regular' or grants.grant_amount > 100" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the response received date for the document described as Regular that was granted more than 100 dollars? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select documents.response_received_date from documents join document_types on documents.document_type_code = document_types.document_type_code join grants on documents.grant_id = grants.grant_id where document_types.document_description = 'Regular' or grants.grant_amount > 100" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the project details of the projects which did not hire any staff for a researcher role. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details for all projects that did not hire any staff in a research role? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ group by _ having count ( _ ) > _ | select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id where projects.project_details = 'omnis' union select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id having count ( * ) > 2" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ group by _ having count ( _ ) > _ | select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id where projects.project_details = 'omnis' union select tasks.task_details , tasks.task_id , projects.project_id from tasks join projects on tasks.project_id = projects.project_id join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id having count ( * ) > 2" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When do all the researcher role staff start to work, and when do they stop working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select date_from , date_to from project_staff where role_code = 'researcher'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did researchers start and stop working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select date_from , date_to from project_staff where role_code = 'researcher'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many kinds of roles are there for the staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct role_code ) from project_staff" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different roles are there on the project staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct role_code ) from project_staff" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of grants given by each organisations? Also list the organisation id. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( grant_amount ) , organisation_id from grants group by organisation_id" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of grant money given to each organization and what is its id? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( grant_amount ) , organisation_id from grants group by organisation_id" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the project details of the projects with the research outcome described with the substring 'Published'. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id join research_outcomes on project_outcomes.outcome_code = research_outcomes.outcome_code where research_outcomes.outcome_description like '%Published%'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details for the project whose research has been published? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select projects.project_details from projects join project_outcomes on projects.project_id = project_outcomes.project_id join research_outcomes on project_outcomes.outcome_code = research_outcomes.outcome_code where research_outcomes.outcome_description like '%Published%'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many staff does each project has? List the project id and the number in an ascending order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select project_staff.project_id , count ( * ) from project_staff join projects on project_staff.project_id = projects.project_id group by project_staff.project_id order by count ( * ) asc" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each project id, how many staff does it have? List them in increasing order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) asc | select project_staff.project_id , count ( * ) from project_staff join projects on project_staff.project_id = projects.project_id group by project_staff.project_id order by count ( * ) asc" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the complete description of the researcher role. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select role_description from staff_roles where role_code = 'researcher'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the complete description of the job of a researcher? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select role_description from staff_roles where role_code = 'researcher'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the first staff for the projects started working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select date_from from project_staff order by date_from asc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the first staff member start working? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select date_from from project_staff order by date_from asc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which project made the most number of outcomes? List the project details and the project id. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select projects.project_details , projects.project_id from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details and id of the project with the most outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select projects.project_details , projects.project_id from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.project_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which projects have no outcome? List the project details. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select project_details from projects where project_id not in ( select project_id from project_outcomes )" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of the project with no outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select project_details from projects where project_id not in ( select project_id from project_outcomes )" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which organisation hired the most number of research staff? List the organisation id, type and detail. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organisations.organisation_id , organisations.organisation_type , organisations.organisation_details from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, types, and details of the organization with the most research staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organisations.organisation_id , organisations.organisation_type , organisations.organisation_details from organisations join research_staff on organisations.organisation_id = research_staff.employer_organisation_id group by organisations.organisation_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the role description and the id of the project staff involved in most number of project outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select staff_roles.role_description , project_staff.staff_id from staff_roles join project_staff on staff_roles.role_code = project_staff.role_code join project_outcomes on project_staff.project_id = project_outcomes.project_id group by project_staff.staff_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each staff id, what is the description of the role that is involved with the most number of projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select staff_roles.role_description , project_staff.staff_id from staff_roles join project_staff on staff_roles.role_code = project_staff.role_code join project_outcomes on project_staff.project_id = project_outcomes.project_id group by project_staff.staff_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which document type is described with the prefix 'Initial'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select document_type_code from document_types where document_description like 'Initial%'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of the document whose description starts with the word 'Initial'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select document_type_code from document_types where document_description like 'Initial%'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Regular' intersect select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Initial Application'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For grants that have descriptions of Regular and Initial Applications, what are their start dates? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Regular' intersect select grants.grant_start_date from grants join documents on grants.grant_id = documents.grant_id join document_types on documents.document_type_code = document_types.document_type_code where document_types.document_description = 'Initial Application'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents can one grant have at most? List the grant id and number. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select grant_id , count ( * ) from documents group by grant_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each grant id, how many documents does it have, and which one has the most? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select grant_id , count ( * ) from documents group by grant_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the organisation type description of the organisation detailed as 'quo'. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select organisation_types.organisation_type_description from organisation_types join organisations on organisation_types.organisation_type = organisations.organisation_type where organisations.organisation_details = 'quo'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type description of the organization whose detail is listed as 'quo'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select organisation_types.organisation_type_description from organisation_types join organisations on organisation_types.organisation_type = organisations.organisation_type where organisations.organisation_details = 'quo'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ order by _ | select organisation_details from organisations join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Sponsor' order by organisation_details" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of all organizations that are described as Sponsors and sort the results in ascending order? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ order by _ | select organisation_details from organisations join organisation_types on organisations.organisation_type = organisation_types.organisation_type where organisation_types.organisation_type_description = 'Sponsor' order by organisation_details" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many Patent outcomes are generated from all the projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from project_outcomes where outcome_code = 'Patent'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many patents outcomes were listed for all the projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from project_outcomes where outcome_code = 'Patent'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many project staff worked as leaders or started working before '1989-04-24 23:51:54'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many project members were leaders or started working before '1989-04-24 23:51:54'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last date of the staff leaving the projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select date_to from project_staff order by date_to desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last date that a staff member left a project? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select date_to from project_staff order by date_to desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the result description of the project whose detail is 'sint'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code join projects on project_outcomes.project_id = projects.project_id where projects.project_details = 'sint'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description for the results whose project detail is 'sint'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code join projects on project_outcomes.project_id = projects.project_id where projects.project_details = 'sint'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the organisation id with the maximum outcome count, and the count. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select projects.organisation_id , count ( * ) from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.organisation_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the organization with the maximum number of outcomes and how many outcomes are there? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select projects.organisation_id , count ( * ) from projects join project_outcomes on projects.project_id = project_outcomes.project_id group by projects.organisation_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the project details of the projects launched by the organisation | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count ( * ) desc limit 1 )" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details for the projects which were launched by the organization with the most projects? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count ( * ) desc limit 1 )" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the research staff details, and order in ascending order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select staff_details from research_staff order by staff_details asc" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What details are there on the research staff? List the result in ascending alphabetical order. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select staff_details from research_staff order by staff_details asc" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tasks are there in total? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from tasks" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tasks are there? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from tasks" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tasks does each project have? List the task count and the project detail. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , projects.project_details from projects join tasks on projects.project_id = tasks.project_id group by projects.project_id" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each project id, how many tasks are there? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , projects.project_details from projects join tasks on projects.project_id = tasks.project_id group by projects.project_id" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the staff roles of the staff who | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ where _ | select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the descriptions of all the project outcomes? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ | select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the description of the outcomes for all projects. | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ | select research_outcomes.outcome_description from research_outcomes join project_outcomes on research_outcomes.outcome_code = project_outcomes.outcome_code" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which role is most common for the staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select role_code from project_staff group by role_code order by count ( * ) desc limit 1" }, { "db_id": "tracking_grants_for_research", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common role for the staff? | document_types : document_type_code , document_description | documents : document_id , document_type_code , grant_id , sent_date , response_received_date , other_details | grants : grant_id , organisation_id , grant_amount , grant_start_date , grant_end_date , other_details | organisation_types : organisation_type , organisation_type_description | organisations : organisation_id , organisation_type , organisation_details | project_outcomes : project_id , outcome_code , outcome_details | project_staff : staff_id , project_id , role_code , date_from , date_to , other_details | projects : project_id , organisation_id , project_details | research_outcomes : outcome_code , outcome_description | research_staff : staff_id , employer_organisation_id , staff_details | staff_roles : role_code , role_description | tasks : task_id , project_id , task_details , eg agree objectives | documents.grant_id = grants.grant_id | documents.document_type_code = document_types.document_type_code | grants.organisation_id = organisations.organisation_id | organisations.organisation_type = organisation_types.organisation_type | project_outcomes.outcome_code = research_outcomes.outcome_code | project_outcomes.project_id = projects.project_id | project_staff.role_code = staff_roles.role_code | project_staff.project_id = projects.project_id | projects.organisation_id = organisations.organisation_id | research_staff.employer_organisation_id = organisations.organisation_id | tasks.project_id = projects.project_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select role_code from project_staff group by role_code order by count ( * ) desc limit 1" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many friends does Dan have? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( personfriend.friend ) from person join personfriend on person.name = personfriend.name where person.name = 'Dan'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many friends does Dan have? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( personfriend.friend ) from person join personfriend on person.name = personfriend.name where person.name = 'Dan'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many females does this network has? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from person where gender = 'female'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many females are in the network? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from person where gender = 'female'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age for all person? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( age ) from person" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age for all people in the table? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( age ) from person" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different cities are they from? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from person" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different cities do people originate from? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct city ) from person" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many type of jobs do they have? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct job ) from person" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different jobs are listed? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct job ) from person" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the oldest person? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select name from person where age = ( select max ( age ) from person )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the person who is the oldest? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select name from person where age = ( select max ( age ) from person )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the oldest person whose job is student? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select name from person where job = 'student' and age = ( select max ( age ) from person where job = 'student' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the oldest student? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select name from person where job = 'student' and age = ( select max ( age ) from person where job = 'student' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the youngest male? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ where _ ) | select name from person where gender = 'male' and age = ( select min ( age ) from person where gender = 'male' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the youngest male? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ where _ ) | select name from person where gender = 'male' and age = ( select min ( age ) from person where gender = 'male' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How old is the doctor named Zach? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select age from person where job = 'doctor' and name = 'Zach'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the age of the doctor named Zach? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select age from person where job = 'doctor' and name = 'Zach'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the person whose age is below 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select name from person where age < 30" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the person whose age is below 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select name from person where age < 30" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many people whose age is greater 30 and job is engineer? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from person where age > 30 and job = 'engineer'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: HOw many engineers are older than 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from person where age > 30 and job = 'engineer'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age for each gender? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , gender from person group by gender" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How old is each gender, on average? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , gender from person group by gender" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is average age for different job title? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , job from person group by job" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How old is the average person for each job? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , job from person group by job" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is average age of male for different job title? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ group by _ | select avg ( age ) , job from person where gender = 'male' group by job" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age for a male in each job? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect avg ( _ ) , _ from _ where _ group by _ | select avg ( age ) , job from person where gender = 'male' group by job" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is minimum age for different job title? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ | select min ( age ) , job from person group by job" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How old is the youngest person for each job? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ | select min ( age ) , job from person group by job" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of people who is under 40 for each gender. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , gender from person where age < 40 group by gender" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many people are under 40 for each gender? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , gender from person where age < 40 group by gender" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of people whose age is greater than any engineer sorted by their age. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ > ( select min ( _ ) from _ where _ ) order by _ asc | select name from person where age > ( select min ( age ) from person where job = 'engineer' ) order by age asc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of all the people who are older than at least one engineer? Order them by age. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ > ( select min ( _ ) from _ where _ ) order by _ asc | select name from person where age > ( select min ( age ) from person where job = 'engineer' ) order by age asc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of people whose age is greater than all engineers. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select max ( _ ) from _ where _ ) | select count ( * ) from person where age > ( select max ( age ) from person where job = 'engineer' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many people are older than every engineer? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select max ( _ ) from _ where _ ) | select count ( * ) from person where age > ( select max ( age ) from person where job = 'engineer' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list the name, job title of all people ordered by their names. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , job from person order by name asc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and job titles of every person ordered alphabetically by name? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , job from person order by name asc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all person sorted in the descending order using age. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from person order by age desc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of everybody sorted by age in descending order? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from person order by age desc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and age of all males in order of their age. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select name from person where gender = 'male' order by age asc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and age of every male? Order the results by age. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select name from person where gender = 'male' order by age asc" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and age of the person who is a friend of both Dan and Alice. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select person.name , person.age from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Dan' intersect select person.name , person.age from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Alice'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ages of every person who is a friend of both Dan and Alice? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select person.name , person.age from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Dan' intersect select person.name , person.age from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Alice'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and age of the person who is a friend of Dan or Alice. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct person.name , person.age from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Dan' or personfriend.friend = 'Alice'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names and ages of every friend of either Dan or alice? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct person.name , person.age from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Dan' or personfriend.friend = 'Alice'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the person who has friends with age above 40 and under age 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) intersect select _ from _ where _ in ( select _ from _ where _ ) | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age > 40 ) intersect select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age < 30 )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of every person who has a friend over 40 and under 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) intersect select _ from _ where _ in ( select _ from _ where _ ) | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age > 40 ) intersect select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age < 30 )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the person who has friends with age above 40 but not under age 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) except select _ from _ where _ in ( select _ from _ where _ ) | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age > 40 ) except select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age < 30 )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the people who are older 40 but no friends under age 30? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) except select _ from _ where _ in ( select _ from _ where _ ) | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age > 40 ) except select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend in ( select name from person where age < 30 )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the person who has no student friends. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from person except select personfriend.name from person join personfriend on person.name = personfriend.friend where person.job = 'student'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the people who have no friends who are students? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from person except select personfriend.name from person join personfriend on person.name = personfriend.friend where person.job = 'student'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the person who has exactly one friend. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select name from personfriend group by name having count ( * ) = 1" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of everybody who has exactly one friend? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select name from personfriend group by name having count ( * ) = 1" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the friends of Bob? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.name where person.name = 'Bob'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are Bob's friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.name where person.name = 'Bob'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of persons who are friends with Bob. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Bob'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all of Bob's friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Bob'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of females who are friends with Zach | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Zach' and person.gender = 'female'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all females who are friends with Zach? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select person.name from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Zach' and person.gender = 'female'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the female friends of Alice. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'female'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the friends of Alice who are female? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'female'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the male friend of Alice whose job is a doctor? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'male' and person.job = 'doctor'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the friends of Alice that are doctors? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.friend from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Alice' and person.gender = 'male' and person.job = 'doctor'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who has a friend that is from new york city? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.name from person join personfriend on person.name = personfriend.friend where person.city = 'new york city'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all friends who are from New York? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ | select personfriend.name from person join personfriend on person.name = personfriend.friend where person.city = 'new york city'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who has friends that are younger than the average age? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select avg ( _ ) from _ ) | select distinct personfriend.name from person join personfriend on person.name = personfriend.friend where person.age < ( select avg ( age ) from person )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of friends who are younger than the average age for a friend? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select avg ( _ ) from _ ) | select distinct personfriend.name from person join personfriend on person.name = personfriend.friend where person.age < ( select avg ( age ) from person )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who has friends that are older than the average age? Print their friends and their ages as well | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select avg ( _ ) from _ ) | select distinct personfriend.name , personfriend.friend , person.age from person join personfriend on person.name = personfriend.friend where person.age > ( select avg ( age ) from person )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Whare the names, friends, and ages of all people who are older than the average age of a person? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select avg ( _ ) from _ ) | select distinct personfriend.name , personfriend.friend , person.age from person join personfriend on person.name = personfriend.friend where person.age > ( select avg ( age ) from person )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the friend of Zach with longest year relationship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select friend from personfriend where name = 'Zach' and year = ( select max ( year ) from personfriend where name = 'Zach' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which friend of Zach has the longest-lasting friendship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select friend from personfriend where name = 'Zach' and year = ( select max ( year ) from personfriend where name = 'Zach' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the age of the friend of Zach with longest year relationship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.age from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Zach' and personfriend.year = ( select max ( year ) from personfriend where name = 'Zach' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ages of all of Zach's friends who are in the longest relationship? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.age from person join personfriend on person.name = personfriend.friend where personfriend.name = 'Zach' and personfriend.year = ( select max ( year ) from personfriend where name = 'Zach' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of persons who are friends with Alice for the shortest years. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ where _ ) | select name from personfriend where friend = 'Alice' and year = ( select min ( year ) from personfriend where friend = 'Alice' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all people who are friends with Alice for the shortest amount of time? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ where _ ) | select name from personfriend where friend = 'Alice' and year = ( select min ( year ) from personfriend where friend = 'Alice' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, age, and job title of persons who are friends with Alice for the longest years. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.name , person.age , person.job from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Alice' and personfriend.year = ( select max ( year ) from personfriend where friend = 'Alice' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ where _ ) | select person.name , person.age , person.job from person join personfriend on person.name = personfriend.name where personfriend.friend = 'Alice' and personfriend.year = ( select max ( year ) from personfriend where friend = 'Alice' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the person that has no friend? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name from person except select name from personfriend" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all people who do not have friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ from _ except select _ from _ | select name from person except select name from personfriend" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which person whose friends have the oldest average age? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select personfriend.name , avg ( person.age ) from person join personfriend on person.name = personfriend.friend group by personfriend.name order by avg ( person.age ) desc limit 1" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the person who has the oldest average age for their friends, and what is that average age? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) desc limit _ | select personfriend.name , avg ( person.age ) from person join personfriend on person.name = personfriend.friend group by personfriend.name order by avg ( person.age ) desc limit 1" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of people who has no friend living in the city of Austin. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct name ) from personfriend where friend not in ( select name from person where city = 'Austin' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of people who have no friends living in Austin? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct name ) from personfriend where friend not in ( select name from person where city = 'Austin' )" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find Alice's friends of friends. | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct personfriend.name from personfriend join person on personfriend.name = person.name join personfriend on personfriend.friend = personfriend.name join personfriend on personfriend.friend = personfriend.name where person.name = 'Alice' and personfriend.name != 'Alice'" }, { "db_id": "network_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all of Alice's friends of friends? | person : name , age , city , gender , job | personfriend : name , friend , year | personfriend.friend = person.name | personfriend.name = person.name | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct personfriend.name from personfriend join person on personfriend.name = person.name join personfriend on personfriend.friend = personfriend.name join personfriend on personfriend.friend = personfriend.name where person.name = 'Alice' and personfriend.name != 'Alice'" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many members are there? | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from member" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of members in ascending alphabetical order. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from member order by name asc" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and countries of members? | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ | select name , country from member" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members whose country is \"United States\" or \"Canada\". | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select name from member where country = 'United States' or country = 'Canada'" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the different countries and the number of members from each. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country , count ( * ) from member group by country" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common country across members. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select country from member group by country order by count ( * ) desc limit 1" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which countries have more than two members? | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select country from member group by country having count ( * ) > 2" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the leader names and locations of colleges. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ | select leader_name , college_location from college" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members and names of colleges they go to. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ | select member.name , college.name from college join member on college.college_id = member.college_id" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select member.name , college.college_location from college join member on college.college_id = member.college_id order by member.name asc" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct leader names of colleges associated with members from country \"Canada\". | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct college.leader_name from college join member on college.college_id = member.college_id where member.country = 'Canada'" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members and the decoration themes they have. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ | select member.name , round.decoration_theme from member join round on member.member_id = round.member_id" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members that have a rank in round higher than 3. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select member.name from member join round on member.member_id = round.member_id where round.rank_in_round > 3" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of members in ascending order of their rank in rounds. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select member.name from member join round on member.member_id = round.member_id order by rank_in_round asc" }, { "db_id": "decoration_competition", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of members who did not participate in any round. | college : college_id , name , leader_name , college_location | member : member_id , name , country , college_id | round : round_id , member_id , decoration_theme , rank_in_round | member.college_id = college.college_id | round.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from member where member_id not in ( select member_id from round )" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and access counts of all documents, in alphabetic order of the document name. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select document_name , access_count from documents order by document_name asc" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the documents, as well as the access counts of each, ordered alphabetically? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select document_name , access_count from documents order by document_name asc" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select document_name , access_count from documents order by access_count desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select document_name , access_count from documents order by access_count desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the types of documents with more than 4 documents. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 4" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes of types of documents of which there are for or more? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 4" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total access count of all documents in the most popular document type. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect sum ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select sum ( access_count ) from documents group by document_type_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total access count of documents that are of the most common document type? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect sum ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select sum ( access_count ) from documents group by document_type_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average access count of documents? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( access_count ) from documents" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average access count across all documents? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( access_count ) from documents" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the structure of the document with the least number of accesses? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select document_structures.document_structure_description from documents join document_structures on documents.document_structure_code = document_structures.document_structure_code group by documents.document_structure_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the structure description of the document that has been accessed the fewest number of times. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select document_structures.document_structure_description from documents join document_structures on documents.document_structure_code = document_structures.document_structure_code group by documents.document_structure_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of the document named \"David CV\"? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_code from documents where document_name = 'David CV'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the type code of the document named \"David CV\". | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_code from documents where document_name = 'David CV'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the list of documents that are both in the most three popular type and have the most three popular structure. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ intersect select _ from _ group by _ order by count ( _ ) desc limit _ | select document_name from documents group by document_type_code order by count ( * ) desc limit 3 intersect select document_name from documents group by document_structure_code order by count ( * ) desc limit 3" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of documents that have both one of the three most common types and one of three most common structures? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ intersect select _ from _ group by _ order by count ( _ ) desc limit _ | select document_name from documents group by document_type_code order by count ( * ) desc limit 3 intersect select document_name from documents group by document_structure_code order by count ( * ) desc limit 3" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What document types do have more than 10000 total access number. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select document_type_code from documents group by document_type_code having sum ( access_count ) > 10000" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the codes of the document types that do not have a total access count of over 10000. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select document_type_code from documents group by document_type_code having sum ( access_count ) > 10000" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the section titles of the document named \"David CV\"? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ | select document_sections.section_title from documents join document_sections on documents.document_code = document_sections.document_code where documents.document_name = 'David CV'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the section titles of the document with the name \"David CV\". | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ | select document_sections.section_title from documents join document_sections on documents.document_code = document_sections.document_code where documents.document_name = 'David CV'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the name of documents without any sections. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select document_name from documents where document_code not in ( select document_code from document_sections )" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of documents that do not have any sections? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select document_name from documents where document_code not in ( select document_code from document_sections )" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the username and passwords of users with the most popular role. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select user_name , password from users group by role_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the usernames and passwords of users that have the most common role? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select user_name , password from users group by role_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average access counts of documents with functional area \"Acknowledgement\". | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( documents.access_count ) from documents join document_functional_areas on documents.document_code = document_functional_areas.document_code join functional_areas on document_functional_areas.functional_area_code = functional_areas.functional_area_code where functional_areas.functional_area_description = 'Acknowledgement'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average access counts of documents that have the functional area description \"Acknowledgement\"? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( documents.access_count ) from documents join document_functional_areas on documents.document_code = document_functional_areas.document_code join functional_areas on document_functional_areas.functional_area_code = functional_areas.functional_area_code where functional_areas.functional_area_description = 'Acknowledgement'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names of the document without any images. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select document_name from documents except select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code join document_sections_images on document_sections.section_id = document_sections_images.section_id" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of documents that do not have any images? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select document_name from documents except select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code join document_sections_images on document_sections.section_id = document_sections_images.section_id" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the document with the most number of sections? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code group by documents.document_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the document that has the most sections. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select documents.document_name from documents join document_sections on documents.document_code = document_sections.document_code group by documents.document_code order by count ( * ) desc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the document names which contains \"CV\". | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select document_name from documents where document_name like '%CV%'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of documents that contain the substring \"CV\"? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select document_name from documents where document_name like '%CV%'" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many users are logged in? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from users where user_login = 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of users that are logged in. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from users where user_login = 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the description of the most popular role among the users that have logged in. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ group by _ order by count ( _ ) desc limit _ ) | select role_description from roles where role_code = ( select role_code from users where user_login = 1 group by role_code order by count ( * ) desc limit 1 )" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the most popular role among users that have logged in? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ where _ group by _ order by count ( _ ) desc limit _ ) | select role_description from roles where role_code = ( select role_code from users where user_login = 1 group by role_code order by count ( * ) desc limit 1 )" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average access count of documents with the least popular structure. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect avg ( _ ) from _ group by _ order by count ( _ ) asc limit _ | select avg ( access_count ) from documents group by document_structure_code order by count ( * ) asc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average access count of documents that have the least common structure? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect avg ( _ ) from _ group by _ order by count ( _ ) asc limit _ | select avg ( access_count ) from documents group by document_structure_code order by count ( * ) asc limit 1" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the image name and URLs in the order of their names. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select image_name , image_url from images order by image_name asc" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and urls of images, sorted alphabetically? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select image_name , image_url from images order by image_name asc" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of users in each role. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , role_code from users group by role_code" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different role codes for users, and how many users have each? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , role_code from users group by role_code" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What document types have more than 2 corresponding documents? | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 2" }, { "db_id": "document_management", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the codes of document types that have more than 2 corresponding documents. | roles : role_code , role_description | users : user_id , role_code , user_name , user_login , password | document_structures : document_structure_code , parent_document_structure_code , document_structure_description | functional_areas : functional_area_code , parent_functional_area_code , functional_area_description | images : image_id , image_alt_text , image_name , image_url | documents : document_code , document_structure_code , document_type_code , access_count , document_name | document_functional_areas : document_code , functional_area_code | document_sections : section_id , document_code , section_sequence , section_code , section_title | document_sections_images : section_id , image_id | users.role_code = roles.role_code | documents.document_structure_code = document_structures.document_structure_code | document_functional_areas.functional_area_code = functional_areas.functional_area_code | document_functional_areas.document_code = documents.document_code | document_sections.document_code = documents.document_code | document_sections_images.image_id = images.image_id | document_sections_images.section_id = document_sections.section_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select document_type_code from documents group by document_type_code having count ( * ) > 2" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many companies are there? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from companies" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from companies" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of companies in descending order of market value. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from companies order by market_value_billion desc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the company names in descending order of the company's market value. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from companies order by market_value_billion desc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of companies whose headquarters are not \"USA\"? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ | select name from companies where headquarters != 'USA'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the companies whose headquarters are not located in \"USA\". | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ | select name from companies where headquarters != 'USA'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and assets of each company, sorted in ascending order of company name? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , assets_billion from companies order by name asc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and assets of each company in ascending order of company name. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , assets_billion from companies order by name asc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average profits of companies? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( profits_billion ) from companies" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average profits companies make. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( profits_billion ) from companies" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum sales of the companies whose industries are not \"Banking\". | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( sales_billion ) , min ( sales_billion ) from companies where industry != 'Banking'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum and minimum sales of the companies that are not in the \"Banking\" industry. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( sales_billion ) , min ( sales_billion ) from companies where industry != 'Banking'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different industries are the companies in? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct industry ) from companies" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct company industries. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct industry ) from companies" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of buildings in descending order of building height. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from buildings order by height desc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of buildings sorted in descending order of building height? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from buildings order by height desc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the stories of the building with the largest height. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select stories from buildings order by height desc limit 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the stories of highest building? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select stories from buildings order by height desc limit 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of a building along with the name of a company whose office is in the building. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ | select companies.name , buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each company, return the company name and the name of the building its office is located in. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ | select companies.name , buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of the buildings that have more than one company offices. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id having count ( * ) > 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which buildings have more than one company offices? Give me the building names. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id having count ( * ) > 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of the building that has the most company offices. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id order by count ( * ) desc limit 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which building has the largest number of company offices? Give me the building name. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select buildings.name from office_locations join buildings on office_locations.building_id = buildings.id join companies on office_locations.company_id = companies.id group by office_locations.building_id order by count ( * ) desc limit 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the names of the buildings whose status is \"on-hold\", in ascending order of stories. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select name from buildings where status = 'on-hold' order by stories asc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the buildings in \"on-hold\" status, and sort them in ascending order of building stories. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select name from buildings where status = 'on-hold' order by stories asc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show each industry and the corresponding number of companies in that industry. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select industry , count ( * ) from companies group by industry" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Whah are the name of each industry and the number of companies in that industry? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select industry , count ( * ) from companies group by industry" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the industries of companies in descending order of the number of companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc | select industry from companies group by industry order by count ( * ) desc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort all the industries in descending order of the count of companies in each industry | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc | select industry from companies group by industry order by count ( * ) desc" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the industry shared by the most companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select industry from companies group by industry order by count ( * ) desc limit 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which industry has the most companies? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select industry from companies group by industry order by count ( * ) desc limit 1" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of buildings that have no company office. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from buildings where id not in ( select building_id from office_locations )" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which buildings do not have any company office? Give me the building names. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from buildings where id not in ( select building_id from office_locations )" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the industries shared by companies whose headquarters are \"USA\" and companies whose headquarters are \"China\". | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select industry from companies where headquarters = 'USA' intersect select industry from companies where headquarters = 'China'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which industries have both companies with headquarter in \"USA\" and companies with headquarter in \"China\"? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select industry from companies where headquarters = 'USA' intersect select industry from companies where headquarters = 'China'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of companies whose industry is \"Banking\" or \"Conglomerate\", | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from companies where industry = 'Banking' or industry = 'Conglomerate'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many companies are in either \"Banking\" industry or \"Conglomerate\" industry? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from companies where industry = 'Banking' or industry = 'Conglomerate'" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the headquarters shared by more than two companies. | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select headquarters from companies group by headquarters having count ( * ) > 2" }, { "db_id": "company_office", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which headquarter locations are used by more than 2 companies? | buildings : id , name , city , height , stories , status | companies : id , name , headquarters , industry , sales_billion , profits_billion , assets_billion , market_value_billion | office_locations : building_id , company_id , move_in_year | office_locations.company_id = companies.id | office_locations.building_id = buildings.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select headquarters from companies group by headquarters having count ( * ) > 2" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are there? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from products" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of products in ascending order of price. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select product_name from products order by product_price asc" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and type codes of products? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ | select product_name , product_type_code from products" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the prices of the products named \"Dining\" or \"Trading Policy\". | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ where _ | select product_price from products where product_name = 'Dining' or product_name = 'Trading Policy'" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price for products? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( product_price ) from products" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the product with the highest price? | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_name from products order by product_price desc limit 1" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different type codes of products and the number of products with each type code. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select product_type_code , count ( * ) from products group by product_type_code" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common type code across products. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select product_type_code from products group by product_type_code order by count ( * ) desc limit 1" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the product type codes that have at least two products. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select product_type_code from products group by product_type_code having count ( * ) >= 2" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select product_type_code from products where product_price > 4500 intersect select product_type_code from products where product_price < 3000" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of products and the number of events they are in. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of products and the number of events they are in, sorted by the number of events in descending order. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select products.product_name , count ( * ) from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name order by count ( * ) desc" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of products that are in at least two events. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select products.product_name from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name having count ( * ) >= 2" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of products that are in at least two events in ascending alphabetical order of product name. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ order by _ asc | select products.product_name from products join products_in_events on products.product_id = products_in_events.product_id group by products.product_name having count ( * ) >= 2 order by products.product_name asc" }, { "db_id": "solvency_ii", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of products that are not in any event. | addresses : address_id , address_details | locations : location_id , other_details | products : product_id , product_type_code , product_name , product_price | parties : party_id , party_details | assets : asset_id , other_details | channels : channel_id , other_details | finances : finance_id , other_details | events : event_id , address_id , channel_id , event_type_code , finance_id , location_id | products_in_events : product_in_event_id , event_id , product_id | parties_in_events : party_id , event_id , role_code | agreements : document_id , event_id | assets_in_events : asset_id , event_id | events.finance_id = finances.finance_id | events.address_id = addresses.address_id | events.location_id = locations.location_id | products_in_events.product_id = products.product_id | products_in_events.event_id = events.event_id | parties_in_events.event_id = events.event_id | parties_in_events.party_id = parties.party_id | agreements.event_id = events.event_id | assets_in_events.event_id = events.event_id | assets_in_events.event_id = events.event_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select product_name from products where product_id not in ( select product_id from products_in_events )" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many artworks are there? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from artwork" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of artworks in ascending alphabetical order. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from artwork order by name asc" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of artworks whose type is not \"Program Talent Show\". | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ where _ | select name from artwork where type != 'Program Talent Show'" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and locations of festivals? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ | select festival_name , location from festival_detail" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the chairs of festivals, sorted in ascending order of the year held? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select chair_name from festival_detail order by year asc" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location of the festival with the largest number of audience? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select location from festival_detail order by num_of_audience desc limit 1" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of festivals held in year 2007? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ where _ | select festival_name from festival_detail where year = 2007" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of audience for festivals? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( num_of_audience ) from festival_detail" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of the three most recent festivals. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select festival_name from festival_detail order by year desc limit 3" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each nomination, show the name of the artwork and name of the festival where it is nominated. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ | select artwork.name , festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show distinct types of artworks that are nominated in festivals in 2007. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct artwork.type from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id where festival_detail.year = 2007" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of artworks in ascending order of the year they are nominated in. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select artwork.name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id order by festival_detail.year asc" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of festivals that have nominated artworks of type \"Program Talent Show\". | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ where _ | select festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id where artwork.type = 'Program Talent Show'" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids and names of festivals that have at least two nominations for artworks. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select nomination.festival_id , festival_detail.festival_name from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id group by nomination.festival_id having count ( * ) >= 2" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id, name of each festival and the number of artworks it has nominated. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select nomination.festival_id , festival_detail.festival_name , count ( * ) from nomination join artwork on nomination.artwork_id = artwork.artwork_id join festival_detail on nomination.festival_id = festival_detail.festival_id group by nomination.festival_id" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show different types of artworks with the corresponding number of artworks of each type. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select type , count ( * ) from artwork group by type" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the most common type of artworks. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select type from artwork group by type order by count ( * ) desc limit 1" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the year in which there are more than one festivals. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select year from festival_detail group by year having count ( * ) > 1" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of artworks that are not nominated. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from artwork where artwork_id not in ( select artwork_id from nomination )" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of audience in year 2008 or 2010. | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ where _ | select num_of_audience from festival_detail where year = 2008 or year = 2010" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total number of the audiences who visited any of the festivals? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( num_of_audience ) from festival_detail" }, { "db_id": "entertainment_awards", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which year are there festivals both inside the 'United States' and outside the 'United States'? | festival_detail : festival_id , festival_name , chair_name , location , year , num_of_audience | artwork : artwork_id , type , name | nomination : artwork_id , festival_id , result | nomination.festival_id = festival_detail.festival_id | nomination.artwork_id = artwork.artwork_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select year from festival_detail where location = 'United States' intersect select year from festival_detail where location != 'United States'" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many premises are there? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from premises" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the distinct premise types? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct premises_type from premises" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the types and details for all premises and order by the premise type. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select premises_type , premise_details from premises order by premises_type asc" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each premise type and the number of premises in that type. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select premises_type , count ( * ) from premises group by premises_type" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct product categories along with the number of mailshots in each category. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select product_category , count ( * ) from mailshot_campaigns group by product_category" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and phone of the customer without any mailshot. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select customer_name , customer_phone from customers where customer_id not in ( select customer_id from mailshot_customers )" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and phone for customers with a mailshot with outcome code 'No Response'. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name , customers.customer_phone from customers join mailshot_customers on customers.customer_id = mailshot_customers.customer_id where mailshot_customers.outcome_code = 'No Response'" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the outcome code of mailshots along with the number of mailshots in each outcome code. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select outcome_code , count ( * ) from mailshot_customers group by outcome_code" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of customers who have at least 2 mailshots with outcome code 'Order'. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select customers.customer_name from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where outcome_code = 'Order' group by mailshot_customers.customer_id having count ( * ) >= 2" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of customers who have the most mailshots. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id group by mailshot_customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name , customers.payment_method from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where mailshot_customers.outcome_code = 'Order' intersect select customers.customer_name , customers.payment_method from mailshot_customers join customers on mailshot_customers.customer_id = customers.customer_id where mailshot_customers.outcome_code = 'No Response'" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the premise type and address type code for all customer addresses. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ | select premises.premises_type , customer_addresses.address_type_code from customer_addresses join premises on customer_addresses.premise_id = premises.premise_id" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct address type codes for all customer addresses? | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct address_type_code from customer_addresses" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the shipping charge and customer id for customer orders with order status Cancelled or Paid. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select order_shipping_charges , customer_id from customer_orders where order_status_code = 'Cancelled' or order_status_code = 'Paid'" }, { "db_id": "customers_campaigns_ecommerce", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of customers having an order with shipping method FedEx and order status Paid. | premises : premise_id , premises_type , premise_details | products : product_id , product_category , product_name | customers : customer_id , payment_method , customer_name , customer_phone , customer_email , customer_address , customer_login , customer_password | mailshot_campaigns : mailshot_id , product_category , mailshot_name , mailshot_start_date , mailshot_end_date | customer_addresses : customer_id , premise_id , date_address_from , address_type_code , date_address_to | customer_orders : order_id , customer_id , order_status_code , shipping_method_code , order_placed_datetime , order_delivered_datetime , order_shipping_charges | mailshot_customers : mailshot_id , customer_id , outcome_code , mailshot_customer_date | order_items : item_id , order_item_status_code , order_id , product_id , item_status_code , item_delivered_datetime , item_order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.premise_id = premises.premise_id | customer_orders.customer_id = customers.customer_id | mailshot_customers.mailshot_id = mailshot_campaigns.mailshot_id | mailshot_customers.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id where shipping_method_code = 'FedEx' and order_status_code = 'Paid'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses are there in total? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from course" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of courses. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from course" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many courses have more than 2 credits? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from course where credits > 2" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of courses with more than 2 credits. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from course where credits > 2" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all names of courses with 1 credit? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select cname from course where credits = 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of courses with 1 credit? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select cname from course where credits = 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which courses are taught on days MTW? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select cname from course where days = 'MTW'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the course names for courses taught on MTW? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select cname from course where days = 'MTW'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of departments in Division \"AS\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from department where division = 'AS'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many departments are in the division AS? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from department where division = 'AS'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phones of departments in Room 268? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dphone from department where room = 268" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the phones for departments in room 268. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dphone from department where room = 268" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students that have at least one grade \"B\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct stuid ) from enrolled_in where grade = 'B'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students have had at least one \"B\" grade? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct stuid ) from enrolled_in where grade = 'B'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the max and min grade point for all letter grade. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( gradepoint ) , min ( gradepoint ) from gradeconversion" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minumum grade points? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( gradepoint ) , min ( gradepoint ) from gradeconversion" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of students whose first names contain letter \"a\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ like _ | select distinct fname from student where fname like '%a%'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names for students who have an \"a\" in their first name? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ like _ | select distinct fname from student where fname like '%a%'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names and last names of male (sex is M) faculties who live in building NEB. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from faculty where sex = 'M' and building = 'NEB'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of faculties with sex M and who live in building NEB? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from faculty where sex = 'M' and building = 'NEB'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the rooms of faculties with rank professor who live in building NEB. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select room from faculty where rank = 'Professor' and building = 'NEB'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the rooms for members of the faculty who are professors and who live in building NEB? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select room from faculty where rank = 'Professor' and building = 'NEB'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the department name that is in Building \"Mergenthaler\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dname from department where building = 'Mergenthaler'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department in the Building Mergenthaler? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dname from department where building = 'Mergenthaler'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all information about courses sorted by credits in the ascending order. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from course order by credits asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information about courses, ordered by credits ascending? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from course order by credits asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the course name of courses sorted by credits. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select cname from course order by credits asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the course names, ordered by credits? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select cname from course order by credits asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of students in the descending order of age. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ desc | select fname from student order by age desc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of students, ordered by age from greatest to least? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ desc | select fname from student order by age desc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of female (sex is F) students in the descending order of age. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select lname from student where sex = 'F' order by age desc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of female students, ordered by age descending? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select lname from student where sex = 'F' order by age desc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of faculties in building Barton in alphabetic order. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select lname from faculty where building = 'Barton' order by lname asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of faculty in building Barton, sorted by last name? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select lname from faculty where building = 'Barton' order by lname asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of faculties of rank Professor in alphabetic order. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select fname from faculty where rank = 'Professor' order by fname asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names for all faculty professors, ordered by first name? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select fname from faculty where rank = 'Professor' order by fname asc" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the department that has the biggest number of students minored in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select department.dname from department join minor_in on department.dno = minor_in.dno group by minor_in.dno order by count ( * ) desc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department with the most students minoring in it? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select department.dname from department join minor_in on department.dno = minor_in.dno group by minor_in.dno order by count ( * ) desc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the department that has no students minored in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select dname from department except select department.dname from department join minor_in on department.dno = minor_in.dno" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department htat has no students minoring in it? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select dname from department except select department.dname from department join minor_in on department.dno = minor_in.dno" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the department that has the fewest members. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department.dname from department join member_of on department.dno = member_of.dno group by member_of.dno order by count ( * ) asc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the department with the fewest members? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department.dname from department join member_of on department.dno = member_of.dno group by member_of.dno order by count ( * ) asc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the rank of the faculty that the fewest faculties belong to. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select rank from faculty group by rank order by count ( * ) asc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the least common faculty rank? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select rank from faculty group by rank order by count ( * ) asc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the instructors who teach the top 3 number of courses? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 3" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of the 3 instructors who teach the most courses? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 3" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which building does the instructor who teaches the most number of courses live in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.building from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the building that the instructor who teaches the greatest number of courses lives in. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.building from course join faculty on course.instructor = faculty.facid group by course.instructor order by count ( * ) desc limit 1" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name of courses that have at least five enrollments? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select course.cname from course join enrolled_in on course.cid = enrolled_in.cid group by enrolled_in.cid having count ( * ) >= 5" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names of the courses with at least five enrollments. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select course.cname from course join enrolled_in on course.cid = enrolled_in.cid group by enrolled_in.cid having count ( * ) >= 5" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and last name of the instructor of course that has course name | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid where course.cname = 'COMPUTER LITERACY'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the full name of the instructor who has a course named COMPUTER LITERACY? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.fname , faculty.lname from course join faculty on course.instructor = faculty.facid where course.cname = 'COMPUTER LITERACY'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select department.dname , department.room from course join department on course.dno = department.dno where course.cname = 'INTRODUCTION TO COMPUTER SCIENCE'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select department.dname , department.room from course join department on course.dno = department.dno where course.cname = 'INTRODUCTION TO COMPUTER SCIENCE'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the student first and last names and grade points of all enrollments. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select student.fname , student.lname , gradeconversion.gradepoint from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names and gradepoints for all enrollments? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ | select student.fname , student.lname , gradeconversion.gradepoint from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct student first names of all students that have grade point at least 3.8 in one course. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where gradeconversion.gradepoint >= 3.8" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct first names for students with a grade point of 3.8 or above in at least one course? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where gradeconversion.gradepoint >= 3.8" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the full names of faculties who are members of department with department number 520. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.fname , faculty.lname from faculty join member_of on faculty.facid = member_of.facid where member_of.dno = 520" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of faculty members who are a part of department 520? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.fname , faculty.lname from faculty join member_of on faculty.facid = member_of.facid where member_of.dno = 520" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and last names of the students that minor in the department with DNO 140. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from minor_in join student on minor_in.stuid = student.stuid where minor_in.dno = 140" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the full names of students minoring in department 140? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from minor_in join student on minor_in.stuid = student.stuid where minor_in.dno = 140" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of faculties who are members of computer science department. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.lname from department join faculty on department.dno = member_of.dno join member_of on faculty.facid = member_of.facid where department.dname = 'Computer Science'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of faculty who are part of the computer science department? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.lname from department join faculty on department.dno = member_of.dno join member_of on faculty.facid = member_of.facid where department.dname = 'Computer Science'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average grade point of student whose last name is Smith. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.lname = 'Smith'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average gradepoint for students with the last name Smith? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.lname = 'Smith'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum and minimum grade point of students who live in NYC? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( gradeconversion.gradepoint ) , min ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.city_code = 'NYC'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the maximum and minimum gradepoints for students living in NYC? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( gradeconversion.gradepoint ) , min ( gradeconversion.gradepoint ) from enrolled_in join gradeconversion join student on enrolled_in.grade = gradeconversion.lettergrade and enrolled_in.stuid = student.stuid where student.city_code = 'NYC'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of courses that have either 3 credits or 1 credit but 4 hours. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of courses that give either 3 credits, or 1 credit and 4 hours? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of departments that are either in division AS or in division EN and in Building NEB. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select dname from department where division = 'AS' union select dname from department where division = 'EN' and building = 'NEB'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of departments either in division AS, or in division EN and in building NEB? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select dname from department where division = 'AS' union select dname from department where division = 'EN' and building = 'NEB'" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of students not enrolled in any course. | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select fname from student where stuid not in ( select stuid from enrolled_in )" }, { "db_id": "college_3", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students that are not enrolled in courses? | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | department : dno , division , dname , room , building , dphone | member_of : facid , dno , appt_type | course : cid , cname , credits , instructor , days , hours , dno | minor_in : stuid , dno | enrolled_in : stuid , cid , grade | gradeconversion : lettergrade , gradepoint | member_of.dno = department.dno | member_of.facid = faculty.facid | course.dno = department.dno | course.instructor = faculty.facid | minor_in.dno = department.dno | minor_in.stuid = student.stuid | enrolled_in.grade = gradeconversion.lettergrade | enrolled_in.cid = course.cid | enrolled_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select fname from student where stuid not in ( select stuid from enrolled_in )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the top three products that were purchased in the largest amount? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_id from product_suppliers order by total_amount_purchased desc limit 3" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the ids of the three products purchased in the largest amounts. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_id from product_suppliers order by total_amount_purchased desc limit 3" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the product id and product type of the cheapest product? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select product_id , product_type_code from products order by product_price asc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the id and product type of the product with the lowest price. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select product_id , product_type_code from products order by product_price asc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of different product types. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct product_type_code ) from products" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct product types. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct product_type_code ) from products" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the address of customer 10. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.address_details from addresses join customer_addresses on addresses.address_id = customer_addresses.address_id where customer_addresses.customer_id = 10" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the address for the customer with id 10? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.address_details from addresses join customer_addresses on addresses.address_id = customer_addresses.address_id where customer_addresses.customer_id = 10" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the staff ids and genders of all staffs whose job title is Department Manager? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select staff.staff_id , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.job_title_code = 'Department Manager'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the staff ids and genders for any staff with the title Department Manager. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select staff.staff_id , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.job_title_code = 'Department Manager'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each payment method, return how many customers use it. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from customers group by payment_method_code" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers use each payment method? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from customers group by payment_method_code" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the product that was ordered the most often? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select product_id from order_items group by product_id order by count ( * ) desc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the product id for the product that was ordered most frequently. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select product_id from order_items group by product_id order by count ( * ) desc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name, phone number and email address of the customer who made the largest number of orders? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name , customers.customer_phone , customers.customer_email from customers join customer_orders on customers.customer_id = customer_orders.customer_id group by customer_orders.customer_id order by count ( * ) desc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name, phone number and email address for the customer with the most orders. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name , customers.customer_phone , customers.customer_email from customers join customer_orders on customers.customer_id = customer_orders.customer_id group by customer_orders.customer_id order by count ( * ) desc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price for each type of product? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select product_type_code , avg ( product_price ) from products group by product_type_code" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average price for each product type. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select product_type_code , avg ( product_price ) from products group by product_type_code" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many department stores does the store chain South have? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from department_stores join department_store_chain on department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id where department_store_chain.dept_store_chain_name = 'South'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of stores the chain South has. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from department_stores join department_store_chain on department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id where department_store_chain.dept_store_chain_name = 'South'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and job title of the staff who was assigned the latest? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select staff.staff_name , staff_department_assignments.job_title_code from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id order by staff_department_assignments.date_assigned_to desc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name and job title of the staff with the latest date assigned. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select staff.staff_name , staff_department_assignments.job_title_code from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id order by staff_department_assignments.date_assigned_to desc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the product type, name and price for all the products supplied by supplier id 3. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_type_code , products.product_name , products.product_price from product_suppliers join products on product_suppliers.product_id = products.product_id where product_suppliers.supplier_id = 3" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the product type, name, and price for products supplied by supplier 3. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_type_code , products.product_name , products.product_price from product_suppliers join products on product_suppliers.product_id = products.product_id where product_suppliers.supplier_id = 3" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the distinct name of customers whose order status is Pending, in the order of customer id. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ order by _ asc | select distinct customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'Pending' order by customer_orders.customer_id asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of customers with an order status of Pending, sorted by customer id? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ order by _ asc | select distinct customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'Pending' order by customer_orders.customer_id asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and address of the customers who have both New and Pending orders. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name , customers.customer_address from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'New' intersect select customers.customer_name , customers.customer_address from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'Pending'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and addressed of customers who have both New and Pending orders? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name , customers.customer_address from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'New' intersect select customers.customer_name , customers.customer_address from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'Pending'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select product_suppliers.product_id from product_suppliers join products on product_suppliers.product_id = products.product_id where product_suppliers.supplier_id = 2 and products.product_price > ( select avg ( product_price ) from products )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select product_suppliers.product_id from product_suppliers join products on product_suppliers.product_id = products.product_id where product_suppliers.supplier_id = 2 and products.product_price > ( select avg ( product_price ) from products )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and name of the department store that has both marketing and managing department? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select department_stores.dept_store_id , department_stores.store_name from departments join department_stores on departments.dept_store_id = department_stores.dept_store_id where departments.department_name = 'marketing' intersect select department_stores.dept_store_id , department_stores.store_name from departments join department_stores on departments.dept_store_id = department_stores.dept_store_id where departments.department_name = 'managing'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of department stores with both marketing and managing departments? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select department_stores.dept_store_id , department_stores.store_name from departments join department_stores on departments.dept_store_id = department_stores.dept_store_id where departments.department_name = 'marketing' intersect select department_stores.dept_store_id , department_stores.store_name from departments join department_stores on departments.dept_store_id = department_stores.dept_store_id where departments.department_name = 'managing'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the two department store chains with the largest number of department stores? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dept_store_chain_id from department_stores group by dept_store_chain_id order by count ( * ) desc limit 2" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the ids of the two department store chains with the most department stores. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dept_store_chain_id from department_stores group by dept_store_chain_id order by count ( * ) desc limit 2" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the department with the least number of staff? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department_id from staff_department_assignments group by department_id order by count ( * ) asc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the id of the department with the fewest staff assignments. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select department_id from staff_department_assignments group by department_id order by count ( * ) asc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each product type, return the maximum and minimum price. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ , max ( _ ) , min ( _ ) from _ group by _ | select product_type_code , max ( product_price ) , min ( product_price ) from products group by product_type_code" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum product prices for each product type? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ , max ( _ ) , min ( _ ) from _ group by _ | select product_type_code , max ( product_price ) , min ( product_price ) from products group by product_type_code" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the product type whose average price is higher than the average price of all products. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > ( select avg ( _ ) from _ ) | select product_type_code from products group by product_type_code having avg ( product_price ) > ( select avg ( product_price ) from products )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the code of the product type with an average price higher than the average price of all products? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > ( select avg ( _ ) from _ ) | select product_type_code from products group by product_type_code having avg ( product_price ) > ( select avg ( product_price ) from products )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and name of the staff who has been assigned for the shortest period. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ - _ asc limit _ | select staff.staff_id , staff.staff_name from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id order by date_assigned_to - date_assigned_from asc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and name of the staff who has been assigned for the least amount of time? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ - _ asc limit _ | select staff.staff_id , staff.staff_name from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id order by date_assigned_to - date_assigned_from asc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names and ids of all products whose price is between 600 and 700. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select product_name , product_id from products where product_price between 600 and 700" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of products costing between 600 and 700? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select product_name , product_id from products where product_price between 600 and 700" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of all distinct customers who made order after some orders that were Cancelled. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct customer_id from customer_orders where order_date > ( select min ( order_date ) from customer_orders where order_status_code = 'Cancelled' )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct ids of customers who made an order after any order that was Cancelled? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct customer_id from customer_orders where order_date > ( select min ( order_date ) from customer_orders where order_status_code = 'Cancelled' )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ < ( select max ( _ ) from _ where _ ) | select staff_id from staff_department_assignments where date_assigned_to < ( select max ( date_assigned_to ) from staff_department_assignments where job_title_code = 'Clerical Staff' )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ < ( select max ( _ ) from _ where _ ) | select staff_id from staff_department_assignments where date_assigned_to < ( select max ( date_assigned_to ) from staff_department_assignments where job_title_code = 'Clerical Staff' )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of customers whose address contains TN? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_name , customer_id from customers where customer_address like '%TN%'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names and ids of customers who have TN in their address. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_name , customer_id from customers where customer_address like '%TN%'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name and gender of the staff who was assigned in 2016. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select staff.staff_name , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.date_assigned_from like '2016%'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and genders of staff who were assigned in 2016? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select staff.staff_name , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.date_assigned_from like '2016%'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of staff who has been assigned multiple jobs. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select staff.staff_name from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id group by staff_department_assignments.staff_id having count ( * ) > 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of staff who have been assigned multiple jobs? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select staff.staff_name from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id group by staff_department_assignments.staff_id having count ( * ) > 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and phone number of all suppliers in the alphabetical order of their addresses. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select suppliers.supplier_name , suppliers.supplier_phone from suppliers join supplier_addresses on suppliers.supplier_id = supplier_addresses.supplier_id join addresses on supplier_addresses.address_id = addresses.address_id order by addresses.address_details asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select suppliers.supplier_name , suppliers.supplier_phone from suppliers join supplier_addresses on suppliers.supplier_id = supplier_addresses.supplier_id join addresses on supplier_addresses.address_id = addresses.address_id order by addresses.address_details asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phone numbers of all customers and suppliers. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select customer_phone from customers union select supplier_phone from suppliers" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the phone numbers for all customers and suppliers. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select customer_phone from customers union select supplier_phone from suppliers" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the ids of all products that were ordered more than three times or supplied more than 80000. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ union select _ from _ group by _ having sum ( _ ) > _ | select product_id from order_items group by product_id having count ( * ) > 3 union select product_id from product_suppliers group by product_id having sum ( total_amount_purchased ) > 80000" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ union select _ from _ group by _ having sum ( _ ) > _ | select product_id from order_items group by product_id having count ( * ) > 3 union select product_id from product_suppliers group by product_id having sum ( total_amount_purchased ) > 80000" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are id and name of the products whose price is lower than 600 or higher than 900? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select product_id , product_name from products where product_price < 600 or product_price > 900" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the ids and names of products with price lower than 600 or higher than 900. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ | select product_id , product_name from products where product_price < 600 or product_price > 900" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ or avg ( _ ) < _ | select supplier_id from product_suppliers group by supplier_id having avg ( total_amount_purchased ) > 50000 or avg ( total_amount_purchased ) < 30000" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) > _ or avg ( _ ) < _ | select supplier_id from product_suppliers group by supplier_id having avg ( total_amount_purchased ) > 50000 or avg ( total_amount_purchased ) < 30000" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average amount purchased and value purchased for the supplier who supplies the most products. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select avg ( total_amount_purchased ) , avg ( total_value_purchased ) from product_suppliers where supplier_id = ( select supplier_id from product_suppliers group by supplier_id order by count ( * ) desc limit 1 )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select avg ( total_amount_purchased ) , avg ( total_value_purchased ) from product_suppliers where supplier_id = ( select supplier_id from product_suppliers group by supplier_id order by count ( * ) desc limit 1 )" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the largest and smallest customer codes? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( customer_code ) , min ( customer_code ) from customers" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the maximum and minimum customer codes. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( customer_code ) , min ( customer_code ) from customers" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all the distinct customers who bought a keyboard. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_name = 'keyboard'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of customers who have purchased a keyboard? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_name = 'keyboard'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and phone numbers of all the distinct suppliers who supply red jeans. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct suppliers.supplier_name , suppliers.supplier_phone from suppliers join product_suppliers on suppliers.supplier_id = product_suppliers.supplier_id join products on product_suppliers.product_id = products.product_id where products.product_name = 'red jeans'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names and phone numbers for suppliers who have red jeans? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct suppliers.supplier_name , suppliers.supplier_phone from suppliers join product_suppliers on suppliers.supplier_id = product_suppliers.supplier_id join products on product_suppliers.product_id = products.product_id where products.product_name = 'red jeans'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , _ from _ group by _ order by _ asc | select max ( product_price ) , min ( product_price ) , product_type_code from products group by product_type_code order by product_type_code asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the maximum and minimum product prices for each product type, grouped and ordered by product type. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , _ from _ group by _ order by _ asc | select max ( product_price ) , min ( product_price ) , product_type_code from products group by product_type_code order by product_type_code asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the order id, customer id for orders in Cancelled status, ordered by their order dates. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select order_id , customer_id from customer_orders where order_status_code = 'Cancelled' order by order_date asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select order_id , customer_id from customer_orders where order_status_code = 'Cancelled' order by order_date asc" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of products that were bought by at least two distinct customers. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( distinct _ ) >= _ | select distinct products.product_name from customer_orders join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id group by products.product_id having count ( distinct customer_orders.customer_id ) >= 2" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of products purchased by at least two different customers? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( distinct _ ) >= _ | select distinct products.product_name from customer_orders join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id group by products.product_id having count ( distinct customer_orders.customer_id ) >= 2" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who have bought by at least three distinct products. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( distinct _ ) >= _ | select distinct customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_id having count ( distinct order_items.product_id ) >= 3" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of customers who have purchased at least three different products? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect distinct _ from _ group by _ having count ( distinct _ ) >= _ | select distinct customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_id having count ( distinct order_items.product_id ) >= 3" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select staff.staff_name , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.job_title_code = 'Sales Person' except select staff.staff_name , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.job_title_code = 'Clerical Staff'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select staff.staff_name , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.job_title_code = 'Sales Person' except select staff.staff_name , staff.staff_gender from staff join staff_department_assignments on staff.staff_id = staff_department_assignments.staff_id where staff_department_assignments.job_title_code = 'Clerical Staff'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and name of customers whose address contains WY state and do not use credit card for payment. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ like _ and _ | select customer_id , customer_name from customers where customer_address like '%WY%' and payment_method_code != 'Credit Card'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ like _ and _ | select customer_id , customer_name from customers where customer_address like '%WY%' and payment_method_code != 'Credit Card'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average price of all product clothes. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( product_price ) from products where product_type_code = 'Clothes'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price of clothes? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( product_price ) from products where product_type_code = 'Clothes'" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the most expensive hardware product. | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select product_name from products where product_type_code = 'Hardware' order by product_price desc limit 1" }, { "db_id": "department_store", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the hardware product with the greatest price? | addresses : address_id , address_details | staff : staff_id , staff_gender , staff_name | suppliers : supplier_id , supplier_name , supplier_phone | department_store_chain : dept_store_chain_id , dept_store_chain_name | customers : customer_id , payment_method_code , customer_code , customer_name , customer_address , customer_phone , customer_email | products : product_id , product_type_code , product_name , product_price | supplier_addresses : supplier_id , address_id , date_from , date_to | customer_addresses : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_status_code , order_date | department_stores : dept_store_id , dept_store_chain_id , store_name , store_address , store_phone , store_email | departments : department_id , dept_store_id , department_name | order_items : order_item_id , order_id , product_id | product_suppliers : product_id , supplier_id , date_supplied_from , date_supplied_to , total_amount_purchased , total_value_purchased | staff_department_assignments : staff_id , department_id , date_assigned_from , job_title_code , date_assigned_to | supplier_addresses.supplier_id = suppliers.supplier_id | supplier_addresses.address_id = addresses.address_id | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_orders.customer_id = customers.customer_id | department_stores.dept_store_chain_id = department_store_chain.dept_store_chain_id | departments.dept_store_id = department_stores.dept_store_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | product_suppliers.product_id = products.product_id | product_suppliers.supplier_id = suppliers.supplier_id | staff_department_assignments.staff_id = staff.staff_id | staff_department_assignments.department_id = departments.department_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select product_name from products where product_type_code = 'Hardware' order by product_price desc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many aircrafts are there? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of aircraft? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the description of all aircrafts. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ | select description from aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the descriptions for the aircrafts? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ | select description from aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of international passengers of all airports? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( international_passengers ) from airport" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of international passengers for an airport? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( international_passengers ) from airport" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the number of international and domestic passengers of the airport named London \"Heathrow\"? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select international_passengers , domestic_passengers from airport where airport_name = 'London Heathrow'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many international and domestic passengers are there in the airport London Heathrow? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select international_passengers , domestic_passengers from airport where airport_name = 'London Heathrow'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total number of Domestic Passengers of airports that contain the word \"London\". | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ like _ | select sum ( domestic_passengers ) from airport where airport_name like '%London%'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total number of domestic passengers at all London airports? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ like _ | select sum ( domestic_passengers ) from airport where airport_name like '%London%'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum number of transit passengers of all aiports. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( transit_passengers ) , min ( transit_passengers ) from airport" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum and mininum number of transit passengers for all airports? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( transit_passengers ) , min ( transit_passengers ) from airport" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name of pilots aged 25 or older? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select name from pilot where age >= 25" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the name of every pilot who is at least 25 years old? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select name from pilot where age >= 25" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all pilot names in ascending alphabetical order. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from pilot order by name asc" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the pilots in alphabetical order? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from pilot order by name asc" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List names of all pilot aged 30 or younger in descending alphabetical order. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select name from pilot where age <= 30 order by name desc" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all pilots 30 years old or young in descending alphabetical order? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select name from pilot where age <= 30 order by name desc" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the names of aircrafts associated with airport with name \"London Gatwick\". | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the aircrafts associated with London Gatwick airport? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.aircraft , aircraft.description from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.total_passengers > 10000000" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ | select aircraft.aircraft , aircraft.description from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.total_passengers > 10000000" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( airport.total_passengers ) from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where aircraft.aircraft = 'Robinson R-22'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average total number of passengers for all airports that the aircraft \"Robinson R-22\" visits? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( airport.total_passengers ) from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where aircraft.aircraft = 'Robinson R-22'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list the location and the winning aircraft name. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ | select match.location , aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location and name of the winning aircraft? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ | select match.location , aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the aircraft that has been named winning aircraft the most number of times. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft order by count ( * ) desc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the aircraft that has won an award the most? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft order by count ( * ) desc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of aircrafts and the number of times it won matches. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select aircraft.aircraft , count ( * ) from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each aircraft that has won an award, what is its name and how many time has it won? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select aircraft.aircraft , count ( * ) from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List names of all pilot in descending order of age. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from pilot order by age desc" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all pilots listed by descending age? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from pilot order by age desc" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of aircrafts and that won matches at least twice. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft having count ( * ) >= 2" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all aircrafts that have won a match at least twice? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select aircraft.aircraft from aircraft join match on aircraft.aircraft_id = match.winning_aircraft group by match.winning_aircraft having count ( * ) >= 2" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of aircrafts and that did not win any match. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select aircraft from aircraft where aircraft_id not in ( select winning_aircraft from match )" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all aicrafts that have never won any match? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select aircraft from aircraft where aircraft_id not in ( select winning_aircraft from match )" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of aircrafts that are associated with both an airport named \"London Heathrow\" and an airport named \"London Gatwick\" | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Heathrow' intersect select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Heathrow' intersect select aircraft.aircraft from aircraft join airport_aircraft on aircraft.aircraft_id = airport_aircraft.aircraft_id join airport on airport_aircraft.airport_id = airport.airport_id where airport.airport_name = 'London Gatwick'" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all information on the airport that has the largest number of international passengers. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select * from airport order by international_passengers desc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information on the airport with the largest number of international passengers? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select * from airport order by international_passengers desc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot where pilot.age < 30 group by match.winning_pilot order by count ( * ) desc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and age of the pilot younger than 30 who has won the most number of times? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot where pilot.age < 30 group by match.winning_pilot order by count ( * ) desc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the name and age of the youngest winning pilot? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot order by pilot.age asc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How old is the youngest winning pilot and what is their name? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select pilot.name , pilot.age from pilot join match on pilot.pilot_id = match.winning_pilot order by pilot.age asc limit 1" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the name of pilots who did not win the matches held in the country of Australia. | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name from pilot where pilot_id not in ( select winning_pilot from match where country = 'Australia' )" }, { "db_id": "aircraft", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the pilots that have not won any matches in Australia? | pilot : pilot_id , name , age | aircraft : aircraft_id , aircraft , description , max_gross_weight , total_disk_area , max_disk_loading | match : round , location , country , date , fastest_qualifying , winning_pilot , winning_aircraft | airport : airport_id , airport_name , total_passengers , %_change_2007 , international_passengers , domestic_passengers , transit_passengers , aircraft_movements , freight_metric_tonnes | airport_aircraft : id , airport_id , aircraft_id | match.winning_pilot = pilot.pilot_id | match.winning_aircraft = aircraft.aircraft_id | airport_aircraft.aircraft_id = aircraft.aircraft_id | airport_aircraft.airport_id = airport.airport_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name from pilot where pilot_id not in ( select winning_pilot from match where country = 'Australia' )" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many residents does each property have? List property id and resident count. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select properties.property_id , count ( * ) from properties join residents on properties.property_id = residents.property_id group by properties.property_id" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct services.service_type_code from services join organizations on services.organization_id = organizations.organization_id where organizations.organization_details = 'Denesik and Sons Party'" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many services has each resident requested? List the resident id, details, and the count in descending order of the count. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select residents.resident_id , residents.other_details , count ( * ) from residents join residents_services on residents.resident_id = residents_services.resident_id group by residents.resident_id order by count ( * ) desc" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum number that a certain service is provided? List the service id, details and number. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select services.service_id , services.service_details , count ( * ) from services join residents_services on services.service_id = residents_services.service_id group by services.service_id order by count ( * ) desc limit 1" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the id and type of each thing, and the details of the organization that owns it. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ from _ | select things.thing_id , things.type_of_thing_code , organizations.organization_details from things join organizations on things.organization_id = organizations.organization_id" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id and details of the customers who have at least 3 events? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select customers.customer_id , customers.customer_details from customers join customer_events on customers.customer_id = customer_events.customer_id group by customers.customer_id having count ( * ) >= 3" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is each customer's move in date, and the corresponding customer id and details? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ from _ | select customer_events.date_moved_in , customers.customer_id , customers.customer_details from customers join customer_events on customers.customer_id = customer_events.customer_id" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which events have the number of notes between one and three? List the event id and the property id. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) between _ and _ | select customer_events.customer_event_id , customer_events.property_id from customer_events join customer_event_notes on customer_events.customer_event_id = customer_event_notes.customer_event_id group by customer_events.customer_event_id having count ( * ) between 1 and 3" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21' | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct things.thing_id , things.type_of_thing_code from timed_status_of_things join things on timed_status_of_things.thing_id = things.thing_id where timed_status_of_things.status_of_thing_code = 'Close' or timed_status_of_things.date_and_date < '2017-06-19 02:59:21'" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct locations have the things with service detail 'Unsatisfied' been located in? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct timed_locations_of_things.location_code ) from things join timed_locations_of_things on things.thing_id = timed_locations_of_things.thing_id where things.service_details = 'Unsatisfied'" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different status codes of things are there? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct status_of_thing_code ) from timed_status_of_things" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which organizations are not a parent organization of others? List the organization id. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select organization_id from organizations except select parent_organization_id from organizations" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When is the last day any resident moved in? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( date_moved_in ) from residents" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the resident details containing the substring 'Miss'? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select other_details from residents where other_details like '%Miss%'" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the customer event id and the corresponding move in date and property id. | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect _ from _ | select customer_event_id , date_moved_in , property_id from customer_events" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers did not have any event? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from customer_events )" }, { "db_id": "local_govt_and_lot", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct move in dates of the residents? | customers : customer_id , customer_details | properties : property_id , property_type_code , property_address , other_details | residents : resident_id , property_id , date_moved_in , date_moved_out , other_details | organizations : organization_id , parent_organization_id , organization_details | services : service_id , organization_id , service_type_code , service_details | residents_services : resident_id , service_id , date_moved_in , property_id , date_requested , date_provided , other_details | things : thing_id , organization_id , type_of_thing_code , service_type_code , service_details | customer_events : customer_event_id , customer_id , date_moved_in , property_id , resident_id , thing_id | customer_event_notes : customer_event_note_id , customer_event_id , service_type_code , resident_id , property_id , date_moved_in | timed_status_of_things : thing_id , date_and_date , status_of_thing_code | timed_locations_of_things : thing_id , date_and_time , location_code | residents.property_id = properties.property_id | services.organization_id = organizations.organization_id | residents_services.resident_id = residents.resident_id | residents_services.property_id = residents.property_id | residents_services.date_moved_in = residents.date_moved_in | residents_services.service_id = services.service_id | things.organization_id = organizations.organization_id | customer_events.resident_id = residents.resident_id | customer_events.property_id = residents.property_id | customer_events.date_moved_in = residents.date_moved_in | customer_events.customer_id = customers.customer_id | customer_events.thing_id = things.thing_id | customer_event_notes.customer_event_id = customer_events.customer_event_id | timed_status_of_things.thing_id = things.thing_id | timed_locations_of_things.thing_id = things.thing_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct date_moved_in from residents" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many schools are there? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from school" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of schools. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from school" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the locations of schools in ascending order of enrollment. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select location from school order by enrollment asc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the list of school locations sorted in ascending order of school enrollment? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select location from school order by enrollment asc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the locations of schools in descending order of founded year. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select location from school order by founded desc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the list of school locations sorted in descending order of school foundation year? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select location from school order by founded desc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the enrollments of schools whose denomination is not \"Catholic\"? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ | select enrollment from school where denomination != 'Catholic'" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the enrollment for each school that does not have \"Catholic\" as denomination. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ | select enrollment from school where denomination != 'Catholic'" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average enrollment of schools? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( enrollment ) from school" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Take the average of the school enrollment. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( enrollment ) from school" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the teams of the players, sorted in ascending alphabetical order? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select team from player order by team asc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the team of each player and sort them in ascending alphabetical order. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select team from player order by team asc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different positions of players are there? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct position ) from player" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct player positions. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct position ) from player" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the team of the player of the highest age. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select team from player order by age desc limit 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which team has the oldest player? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select team from player order by age desc limit 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the teams of the players with the top 5 largest ages. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select team from player order by age desc limit 5" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the teams that have the 5 oldest players? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select team from player order by age desc limit 5" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each player, show the team and the location of school they belong to. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ | select player.team , school.location from player join school on player.school_id = school.school_id" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the team and the location of school each player belongs to? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ | select player.team , school.location from player join school on player.school_id = school.school_id" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the locations of schools that have more than 1 player. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select school.location from player join school on player.school_id = school.school_id group by player.school_id having count ( * ) > 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which schools have more than 1 player? Give me the school locations. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select school.location from player join school on player.school_id = school.school_id group by player.school_id having count ( * ) > 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the denomination of the school that has the most players. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select school.denomination from player join school on player.school_id = school.school_id group by player.school_id order by count ( * ) desc limit 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the denomination of the school the most players belong to? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select school.denomination from player join school on player.school_id = school.school_id group by player.school_id order by count ( * ) desc limit 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show locations and nicknames of schools. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ | select school.location , school_details.nickname from school join school_details on school.school_id = school_details.school_id" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the location and nickname of each school? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ | select school.location , school_details.nickname from school join school_details on school.school_id = school_details.school_id" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show different denominations and the corresponding number of schools. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select denomination , count ( * ) from school group by denomination" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each denomination, return the denomination and the count of schools with that denomination. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select denomination , count ( * ) from school group by denomination" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show different denominations and the corresponding number of schools in descending order. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select denomination , count ( * ) from school group by denomination order by count ( * ) desc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select denomination , count ( * ) from school group by denomination order by count ( * ) desc" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the school color of the school that has the largest enrollment. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select school_colors from school order by enrollment desc limit 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the school color of the school with the largest enrollment? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select school_colors from school order by enrollment desc limit 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the locations of schools that do not have any player. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select location from school where school_id not in ( select school_id from player )" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which schools do not have any player? Give me the school locations. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select location from school where school_id not in ( select school_id from player )" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the denomination shared by schools founded before 1890 and schools founded after 1900 | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the denominations used by both schools founded before 1890 and schools founded after 1900? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the nicknames of schools that are not in division 1. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ | select nickname from school_details where division != 'Division 1'" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the nicknames of schools whose division is not 1? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ | select nickname from school_details where division != 'Division 1'" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the denomination shared by more than one school. | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select denomination from school group by denomination having count ( * ) > 1" }, { "db_id": "school_player", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the denomination more than one school have? | school : school_id , school , location , enrollment , founded , denomination , boys_or_girls , day_or_boarding , year_entered_competition , school_colors | school_details : school_id , nickname , colors , league , class , division | school_performance : school_id , school_year , class_a , class_aa | player : player_id , player , team , age , position , school_id | school_details.school_id = school.school_id | school_performance.school_id = school.school_id | player.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select denomination from school group by denomination having count ( * ) > 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the distinct district names ordered by city area in descending. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect distinct _ from _ order by _ desc | select distinct district_name from district order by city_area desc" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different district names in order of descending city area? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect distinct _ from _ order by _ desc | select distinct district_name from district order by city_area desc" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the list of page size which have more than 3 product listed | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select max_page_size from product group by max_page_size having count ( * ) > 3" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum page size for everything that has more than 3 products listed? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select max_page_size from product group by max_page_size having count ( * ) > 3" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and population of district with population between 200000 and 2000000 | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select district_name , city_population from district where city_population between 200000 and 2000000" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select district_name , city_population from district where city_population between 200000 and 2000000" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name all districts with city area greater than 10 or population larger than 100000 | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select district_name from district where city_area > 10 or city_population > 100000" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all districts with a city area greater than 10 or have more than 100000 people living there? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select district_name from district where city_area > 10 or city_population > 100000" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which district has the largest population? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select district_name from district order by city_population desc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the district with the most residents? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select district_name from district order by city_population desc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which district has the least area? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select district_name from district order by city_area asc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the district with the smallest area? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select district_name from district order by city_area asc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total population of the top 3 districts with the largest area. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect sum ( _ ) from _ order by _ desc limit _ | select sum ( city_population ) from district order by city_area desc limit 3" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of residents for the districts with the 3 largest areas? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect sum ( _ ) from _ order by _ desc limit _ | select sum ( city_population ) from district order by city_area desc limit 3" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all types of store and number of them. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select type , count ( * ) from store group by type" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each type of store, how many of them are there? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select type , count ( * ) from store group by type" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all stores in Khanewal District. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select store.store_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where district.district_name = 'Khanewal District'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the stores located in Khanewal District? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select store.store_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where district.district_name = 'Khanewal District'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the stores in the district with the most population. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ order by _ desc limit _ ) | select store.store_name from store join store_district on store.store_id = store_district.store_id where district_id = ( select district_id from district order by city_population desc limit 1 )" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the stores in the largest district by population? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ order by _ desc limit _ ) | select store.store_name from store join store_district on store.store_id = store_district.store_id where district_id = ( select district_id from district order by city_population desc limit 1 )" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city is the headquarter of the store named \"Blackville\" in? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.store_name = 'Blackville'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What city is the headquarter of the store Blackville? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.store_name = 'Blackville'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of stores in each city. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select district.headquartered_city , count ( * ) from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many stores are headquarted in each city? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select district.headquartered_city , count ( * ) from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city with the most number of stores. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city order by count ( * ) desc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the city with the most number of flagship stores? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select district.headquartered_city from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id group by district.headquartered_city order by count ( * ) desc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average pages per minute color? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( pages_per_minute_color ) from product" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of pages per minute color? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( pages_per_minute_color ) from product" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What products are available at store named \"Miramichi\"? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select product.product from product join store_product on product.product_id = store_product.product_id join store on store_product.store_id = store.store_id where store.store_name = 'Miramichi'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What products are sold at the store named Miramichi? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select product.product from product join store_product on product.product_id = store_product.product_id join store on store_product.store_id = store.store_id where store.store_name = 'Miramichi'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find products with max page size as \"A4\" and pages per minute color smaller than 5. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select product from product where max_page_size = 'A4' and pages_per_minute_color < 5" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select product from product where max_page_size = 'A4' and pages_per_minute_color < 5" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find products with max page size as \"A4\" or pages per minute color smaller than 5. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select product from product where max_page_size = 'A4' or pages_per_minute_color < 5" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ | select product from product where max_page_size = 'A4' or pages_per_minute_color < 5" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the product whose name contains the word \"Scanner\". | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select product from product where product like '%Scanner%'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all of the products whose name includes the substring \"Scanner\"? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select product from product where product like '%Scanner%'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the most prominent max page size among all the products. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select max_page_size from product group by max_page_size order by count ( * ) desc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common maximum page size? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select max_page_size from product group by max_page_size order by count ( * ) desc limit 1" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the products that are not using the most frequently-used max page size. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ != ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select product from product where product != ( select max_page_size from product group by max_page_size order by count ( * ) desc limit 1 )" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all products that are not the most frequently-used maximum page size? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ != ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select product from product where product != ( select max_page_size from product group by max_page_size order by count ( * ) desc limit 1 )" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total population of the districts where the area is bigger than the average city area. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select sum ( city_population ) from district where city_area > ( select avg ( city_area ) from district )" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total population for all the districts that have an area larger tahn the average city area? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select sum ( city_population ) from district where city_area > ( select avg ( city_area ) from district )" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of districts where have both city mall and village store type stores. | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select district.district_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.type = 'City Mall' intersect select district.district_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.type = 'Village Store'" }, { "db_id": "store_product", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the districts that have both mall and village store style shops? | product : product_id , product , dimensions , dpi , pages_per_minute_color , max_page_size , interface | store : store_id , store_name , type , area_size , number_of_product_category , ranking | district : district_id , district_name , headquartered_city , city_population , city_area | store_product : store_id , product_id | store_district : store_id , district_id | store_product.store_id = store.store_id | store_district.district_id = district.district_id | store_district.store_id = store.store_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select district.district_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.type = 'City Mall' intersect select district.district_name from store join store_district on store.store_id = store_district.store_id join district on store_district.district_id = district.district_id where store.type = 'Village Store'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total enrollment number of all colleges? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( enr ) from college" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are enrolled in college? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( enr ) from college" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average enrollment number? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( enr ) from college" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students, on average, does each college have enrolled? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( enr ) from college" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many colleges in total? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from college" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different colleges are there? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from college" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many players have more than 1000 hours of training? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from player where hs > 1000" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different players trained for more than 1000 hours? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from player where hs > 1000" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many colleges has more than 15000 students? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from college where enr > 15000" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of colleges with a student population greater than 15000? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from college where enr > 15000" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average training hours of all players? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( hs ) from player" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many hours do the players train on average? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( hs ) from player" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and training hours of players whose hours are below 1500. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select pname , hs from player where hs < 1500" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and number of hours spent training for each player who trains for less than 1500 hours? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select pname , hs from player where hs < 1500" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different colleges do attend the tryout test? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct cname ) from tryout" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different colleges were represented at tryouts? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct cname ) from tryout" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the unique types of player positions in the tryout? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct ppos ) from tryout" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different types of player positions? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct ppos ) from tryout" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students got accepted after the tryout? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from tryout where decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students received a yes from tryouts? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from tryout where decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students whose are playing the role of goalie? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from tryout where ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of students playing as a goalie? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from tryout where ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the max, average and min training hours of all players. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , min ( _ ) from _ | select avg ( hs ) , max ( hs ) , min ( hs ) from player" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average, maximum, and minimum for the number of hours spent training? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , min ( _ ) from _ | select avg ( hs ) , max ( hs ) , min ( hs ) from player" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is average enrollment of colleges in the state FL? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( enr ) from college where state = 'FL'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is average number of students enrolled in Florida colleges? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( enr ) from college where state = 'FL'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of players whose training hours is between 500 and 1500? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select pname from player where hs between 500 and 1500" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of players who train between 500 and 1500 hours? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select pname from player where hs between 500 and 1500" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the players whose names contain letter 'a'. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ like _ | select distinct pname from player where pname like '%a%'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the players that have names containing the letter a? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ like _ | select distinct pname from player where pname like '%a%'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select cname , enr from college where enr > 10000 and state = 'LA'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select cname , enr from college where enr > 10000 and state = 'LA'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all information about college sorted by enrollment number in the ascending order. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from college order by enr asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What information do you have on colleges sorted by increasing enrollment numbers? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ order by _ asc | select * from college order by enr asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the colleges whose enrollment is greater 18000 sorted by the college's name. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select cname from college where enr > 18000 order by cname asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of every college in alphabetical order that has more than 18000 students enrolled? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select cname from college where enr > 18000 order by cname asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of players whose card is yes in the descending order of training hours. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select pname from player where ycard = 'yes' order by hs desc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name of the players who received a card in descending order of the hours of training? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select pname from player where ycard = 'yes' order by hs desc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of different colleges involved in the tryout in alphabetical order. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct cname from tryout order by cname asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of the colleges involved in the tryout in alphabetical order? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct cname from tryout order by cname asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which position is most popular among players in the tryout? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ppos from tryout group by ppos order by count ( * ) desc limit 1" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What was the most popular position at tryouts? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ppos from tryout group by ppos order by count ( * ) desc limit 1" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students who participate in the tryout for each college ordered by descending count. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , cname from tryout group by cname order by count ( * ) desc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students participated in tryouts for each college by descennding count? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , cname from tryout group by cname order by count ( * ) desc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is minimum hours of the students playing in different position? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ | select min ( player.hs ) , tryout.ppos from tryout join player on tryout.pid = player.pid group by tryout.ppos" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each position, what is the minimum time students spent practicing? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect min ( _ ) , _ from _ group by _ | select min ( player.hs ) , tryout.ppos from tryout join player on tryout.pid = player.pid group by tryout.ppos" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of schools with the top 3 largest size? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select cname from college order by enr desc limit 3" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the schools with the top 3 largest class sizes? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select cname from college order by enr desc limit 3" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of school that has the smallest enrollment in each state? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select cname , state , min ( enr ) from college group by state" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the school with smallest enrollment size per state? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select cname , state , min ( enr ) from college group by state" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the states where have some college students in tryout. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ | select distinct state from college join tryout on college.cname = tryout.cname" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different states that have students trying out? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ | select distinct state from college join tryout on college.cname = tryout.cname" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the states where have some college students in tryout and their decisions are yes. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct college.state from college join tryout on college.cname = tryout.cname where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different states that had students successfully try out? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct college.state from college join tryout on college.cname = tryout.cname where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and college of students whose decisions are yes in the tryout. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select player.pname , tryout.cname from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select player.pname , tryout.cname from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of all students who were in the tryout sorted in alphabetic order. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ order by _ asc | select player.pname from player join tryout on player.pid = tryout.pid order by player.pname asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all students who tried out in alphabetical order? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ order by _ asc | select player.pname from player join tryout on player.pid = tryout.pid order by player.pname asc" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and hours of the students whose tryout decision is yes. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select player.pname , player.hs from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and hours spent practicing of every student who received a yes at tryouts? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select player.pname , player.hs from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the states of the colleges that have students in the tryout who played in striker position. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'striker'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the states of the colleges where students who tried out for the striker position attend? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'striker'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the students who are in the position of striker and got a yes tryout decision. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select player.pname from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes' and tryout.ppos = 'striker'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all students who successfully tried out for the position of striker? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select player.pname from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes' and tryout.ppos = 'striker'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the state of the college which player Charles is attending. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname join player on tryout.pid = player.pid where player.pname = 'Charles'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which state is the college that Charles attends? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname join player on tryout.pid = player.pid where player.pname = 'Charles'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average and maximum hours for the students whose tryout decision is yes. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ where _ | select avg ( player.hs ) , max ( player.hs ) from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and maximum number of hours students who made the team practiced? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ where _ | select avg ( player.hs ) , max ( player.hs ) from player join tryout on player.pid = tryout.pid where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average hours for the students whose tryout decision is no. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( player.hs ) from player join tryout on player.pid = tryout.pid where tryout.decision = 'no'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average number of hours spent practicing for students who got rejected? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( player.hs ) from player join tryout on player.pid = tryout.pid where tryout.decision = 'no'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect max ( _ ) , _ from _ where _ group by _ | select max ( player.hs ) , ppos from player join tryout on player.pid = tryout.pid where player.hs > 1000 group by tryout.ppos" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each position, what is the maximum number of hours for students who spent more than 1000 hours training? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect max ( _ ) , _ from _ where _ group by _ | select max ( player.hs ) , ppos from player join tryout on player.pid = tryout.pid where player.hs > 1000 group by tryout.ppos" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which colleges do the tryout players whose name starts with letter D go to? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ like _ | select tryout.cname from tryout join player on tryout.pid = player.pid where player.pname like 'D%'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which colleges does each player with a name that starts with the letter D who tried out go to? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ like _ | select tryout.cname from tryout join player on tryout.pid = player.pid where player.pname like 'D%'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which college has any student who is a goalie and succeeded in the tryout. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select cname from tryout where decision = 'yes' and ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What college has a student who successfully made the team in the role of a goalie? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ | select cname from tryout where decision = 'yes' and ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the tryout players who are from the college with largest size. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ order by _ desc limit _ ) | select player.pname from tryout join player on tryout.pid = player.pid where tryout.cname = ( select cname from college order by enr desc limit 1 )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all tryout participants who are from the largest college? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ order by _ desc limit _ ) | select player.pname from tryout join player on tryout.pid = player.pid where tryout.cname = ( select cname from college order by enr desc limit 1 )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct college.state , college.enr from college join tryout on college.cname = tryout.cname where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct college.state , college.enr from college join tryout on college.cname = tryout.cname where tryout.decision = 'yes'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select cname from college where enr < 13000 and state = 'AZ' union select cname from college where enr > 15000 and state = 'LA'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select cname from college where enr < 13000 and state = 'AZ' union select cname from college where enr > 15000 and state = 'LA'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of schools that have some students playing in goalie and mid positions. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all schools that have students trying out for the position of goal and 'mid'-field. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of states that have some college students playing in goalie and mid positions. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'goalie' intersect select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'mid'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the states that have some college students playing in the positions of goalie and mid-field? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'goalie' intersect select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'mid'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many schools have some students playing in goalie and mid positions. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ where _ intersect select _ from _ where _ ) | select count ( * ) from ( select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many schools have students playing in goalie and mid-field positions? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ where _ intersect select _ from _ where _ ) | select count ( * ) from ( select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of schools that have some players in the mid position but not in the goalie position. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select cname from tryout where ppos = 'mid' except select cname from tryout where ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the schools with some players in the mid position but no goalies? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select cname from tryout where ppos = 'mid' except select cname from tryout where ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of states that have some college students playing in the mid position but not in the goalie position. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'mid' except select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the states with college students playing in the mid position but no goalies? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'mid' except select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'goalie'" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many states that have some college students playing in the mid position but not in the goalie position. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ where _ except select _ from _ where _ ) | select count ( * ) from ( select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'mid' except select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'goalie' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of states with college students playing in the mid position but not as goalies? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ where _ except select _ from _ where _ ) | select count ( * ) from ( select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'mid' except select college.state from college join tryout on college.cname = tryout.cname where tryout.ppos = 'goalie' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the states where have the colleges whose enrollments are less than the largest size. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select max ( _ ) from _ ) | select distinct state from college where enr < ( select max ( enr ) from college )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the states with colleges that have enrollments less than the some other college? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ < ( select max ( _ ) from _ ) | select distinct state from college where enr < ( select max ( enr ) from college )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names of colleges with enrollment greater than that of some (at least one) college in the FL state. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct cname from college where enr > ( select min ( enr ) from college where state = 'FL' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the colleges that are larger than at least one college in Florida? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct cname from college where enr > ( select min ( enr ) from college where state = 'FL' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names of all colleges whose enrollment is greater than that of all colleges in the FL state. | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select cname from college where enr > ( select max ( enr ) from college where state = 'FL' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all colleges with a larger enrollment than the largest college in Florida? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select cname from college where enr > ( select max ( enr ) from college where state = 'FL' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of enrollment of schools that do not have any goalie player? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ not in ( select _ from _ where _ ) | select sum ( enr ) from college where cname not in ( select cname from tryout where ppos = 'goalie' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of students enrolled in schools without any goalies? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ not in ( select _ from _ where _ ) | select sum ( enr ) from college where cname not in ( select cname from tryout where ppos = 'goalie' )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of states that has some college whose enrollment is larger than the average enrollment? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( distinct state ) from college where enr > ( select avg ( enr ) from college )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many states have a college with more students than average? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( distinct state ) from college where enr > ( select avg ( enr ) from college )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of states that has some colleges whose enrollment is smaller than the average enrollment? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ < ( select avg ( _ ) from _ ) | select count ( distinct state ) from college where enr < ( select avg ( enr ) from college )" }, { "db_id": "soccer_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many states have smaller colleges than average? | college : cname , state , enr | player : pid , pname , ycard , hs | tryout : pid , cname , ppos , decision | tryout.cname = college.cname | tryout.pid = player.pid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ < ( select avg ( _ ) from _ ) | select count ( distinct state ) from college where enr < ( select avg ( enr ) from college )" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many devices are there? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from device" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of devices. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from device" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the carriers of devices in ascending alphabetical order. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select carrier from device order by carrier asc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different carriers for devices, listed in alphabetical order? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select carrier from device order by carrier asc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the carriers of devices whose software platforms are not \"Android\"? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ | select carrier from device where software_platform != 'Android'" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the device carriers that do not have Android as their software platform. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ | select carrier from device where software_platform != 'Android'" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of shops in ascending order of open year? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select shop_name from shop order by open_year asc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of shops, ordered by year of opening ascending. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select shop_name from shop order by open_year asc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average quantity of stocks? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( quantity ) from stock" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the average quantity of stocks. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( quantity ) from stock" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and location of the shops in ascending alphabetical order of name. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select shop_name , location from shop order by shop_name asc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names and locations of shops, ordered by name in alphabetical order. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select shop_name , location from shop order by shop_name asc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different software platforms are there for devices? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct software_platform ) from device" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different software platforms. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct software_platform ) from device" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the open date of open year of the shop named \"Apple\". | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ | select open_date , open_year from shop where shop_name = 'Apple'" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the open dates and years for the shop named Apple? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ | select open_date , open_year from shop where shop_name = 'Apple'" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the shop with the latest open year. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select shop_name from shop order by open_year desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the shop name corresponding to the shop that opened in the most recent year? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select shop_name from shop order by open_year desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of shops and the carriers of devices they have in stock. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ | select shop.shop_name , device.carrier from stock join device on stock.device_id = device.device_id join shop on stock.shop_id = shop.shop_id" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of device shops, and what are the carriers that they carry devices in stock for? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ | select shop.shop_name , device.carrier from stock join device on stock.device_id = device.device_id join shop on stock.shop_id = shop.shop_id" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names of shops that have more than one kind of device in stock. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select shop.shop_name from stock join shop on stock.shop_id = shop.shop_id group by stock.shop_id having count ( * ) > 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of shops that have more than a single kind of device in stock? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select shop.shop_name from stock join shop on stock.shop_id = shop.shop_id group by stock.shop_id having count ( * ) > 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of the shop that has the most kind of devices in stock. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select shop.shop_name from stock join shop on stock.shop_id = shop.shop_id group by stock.shop_id order by count ( * ) desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the shop that has the most different kinds of devices in stock? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select shop.shop_name from stock join shop on stock.shop_id = shop.shop_id group by stock.shop_id order by count ( * ) desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of the shop that have the largest quantity of devices in stock. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select shop.shop_name from stock join shop on stock.shop_id = shop.shop_id group by stock.shop_id order by sum ( stock.quantity ) desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the shop that has the greatest quantity of devices in stock? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select shop.shop_name from stock join shop on stock.shop_id = shop.shop_id group by stock.shop_id order by sum ( stock.quantity ) desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show different software platforms and the corresponding number of devices using each. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select software_platform , count ( * ) from device group by software_platform" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different software platforms for devices, and how many devices have each? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select software_platform , count ( * ) from device group by software_platform" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the software platforms of devices in descending order of the count. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc | select software_platform from device group by software_platform order by count ( * ) desc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different software platforms for devices, ordered by frequency descending? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc | select software_platform from device group by software_platform order by count ( * ) desc" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the software platform shared by the greatest number of devices. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select software_platform from device group by software_platform order by count ( * ) desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the software platform that is most common amongst all devices? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select software_platform from device group by software_platform order by count ( * ) desc limit 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of shops that have no devices in stock. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select shop_name from shop where shop_id not in ( select shop_id from stock )" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of shops that do not have any devices in stock? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select shop_name from shop where shop_id not in ( select shop_id from stock )" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select location from shop where open_year > 2012 intersect select location from shop where open_year < 2008" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which locations contains both shops that opened after the year 2012 and shops that opened before 2008? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select location from shop where open_year > 2012 intersect select location from shop where open_year < 2008" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the carriers of devices that have no devices in stock. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select carrier from device where device_id not in ( select device_id from stock )" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the carriers of devices that are not in stock anywhere? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select carrier from device where device_id not in ( select device_id from stock )" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the carriers of devices in stock at more than one shop. | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select device.carrier from stock join device on stock.device_id = device.device_id group by stock.device_id having count ( * ) > 1" }, { "db_id": "device", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the carriers of devices that are in stock in more than a single shop? | device : device_id , device , carrier , package_version , applications , software_platform | shop : shop_id , shop_name , location , open_date , open_year | stock : shop_id , device_id , quantity | stock.device_id = device.device_id | stock.shop_id = shop.shop_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select device.carrier from stock join device on stock.device_id = device.device_id group by stock.device_id having count ( * ) > 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many bookings do we have? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from bookings" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the total number of bookings made. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from bookings" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the order dates of all the bookings. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select order_date from bookings" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the order date of each booking? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select order_date from bookings" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the planned delivery dates and actual delivery dates of bookings. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select planned_delivery_date , actual_delivery_date from bookings" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the planned delivery date and actual delivery date for each booking? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select planned_delivery_date , actual_delivery_date from bookings" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers do we have? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers recorded. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phone and email for customer Harold? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone , customer_email_address from customers where customer_name = 'Harold'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the phone number and email address of customer \"Harold\". | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone , customer_email_address from customers where customer_name = 'Harold'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the Store_Name of drama workshop groups. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select store_name from drama_workshop_groups" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the store names of drama workshop groups? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select store_name from drama_workshop_groups" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the minimum, average, maximum order quantity of all invoices. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( order_quantity ) , avg ( order_quantity ) , max ( order_quantity ) from invoices" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the minimum, average, and maximum quantities ordered? Check all the invoices. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect min ( _ ) , avg ( _ ) , max ( _ ) from _ | select min ( order_quantity ) , avg ( order_quantity ) , max ( order_quantity ) from invoices" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct payment method codes in all the invoices? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct payment_method_code from invoices" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show me the distinct payment method codes from the invoice record. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct payment_method_code from invoices" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the marketing region China? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select marketing_region_descriptrion from marketing_regions where marketing_region_name = 'China'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the marketing region description of China? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select marketing_region_descriptrion from marketing_regions where marketing_region_name = 'China'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the distinct product names with price higher than the average. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select avg ( _ ) from _ ) | select distinct product_name from products where product_price > ( select avg ( product_price ) from products )" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of the products that cost more than the average? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select avg ( _ ) from _ ) | select distinct product_name from products where product_price > ( select avg ( product_price ) from products )" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the most expensive product? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_name from products order by product_price desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the name of the most pricy product. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_name from products order by product_price desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all product names in ascending order of price. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select product_name from products order by product_price asc" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the names of products in ascending order of their price. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select product_name from products order by product_price asc" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the phone number of the performer Ashley? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone from performers where customer_name = 'Ashley'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the phone number of performer \"Ashley\". | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_phone from performers where customer_name = 'Ashley'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all payment method codes and the number of orders for each code. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from invoices group by payment_method_code" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the distinct payment method codes with the number of orders made | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from invoices group by payment_method_code" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the payment method code used by the most orders? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method_code from invoices group by payment_method_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the payment method that is used the most often in all the invoices. Give me its code. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method_code from invoices group by payment_method_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city is the address of the store named \"FJA Filming\" located in? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.city_town from addresses join stores on addresses.address_id = stores.address_id where stores.store_name = 'FJA Filming'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city the store named \"FJA Filming\" is in. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.city_town from addresses join stores on addresses.address_id = stores.address_id where stores.store_name = 'FJA Filming'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the states or counties of the address of the stores with marketing region code \"CA\"? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.state_county from addresses join stores on addresses.address_id = stores.address_id where stores.marketing_region_code = 'CA'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the states or counties where the stores with marketing region code \"CA\" are located. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.state_county from addresses join stores on addresses.address_id = stores.address_id where stores.marketing_region_code = 'CA'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the marketing region that the store Rob Dinning belongs to? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select marketing_regions.marketing_region_name from marketing_regions join stores on marketing_regions.marketing_region_code = stores.marketing_region_code where stores.store_name = 'Rob Dinning'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the marketing region the store Rob Dinning is located in. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select marketing_regions.marketing_region_name from marketing_regions join stores on marketing_regions.marketing_region_code = stores.marketing_region_code where stores.store_name = 'Rob Dinning'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the descriptions of the service types with product price above 100? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_service_types.service_type_description from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code where services.product_price > 100" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the descriptions of the service types that cost more than 100. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_service_types.service_type_description from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code where services.product_price > 100" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description, code and the corresponding count of each service type? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select ref_service_types.service_type_description , services.service_type_code , count ( * ) from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code group by services.service_type_code" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the description, code and the number of services for each service type. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select ref_service_types.service_type_description , services.service_type_code , count ( * ) from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code group by services.service_type_code" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description and code of the type of service that is performed the most often? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ref_service_types.service_type_description , ref_service_types.service_type_code from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code group by ref_service_types.service_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the description and code of the service type that is performed the most times. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ref_service_types.service_type_description , ref_service_types.service_type_code from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code group by ref_service_types.service_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phones and emails of workshop groups in which services are performed? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select drama_workshop_groups.store_phone , drama_workshop_groups.store_email_address from drama_workshop_groups join services on drama_workshop_groups.workshop_group_id = services.workshop_group_id" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me all the phone numbers and email addresses of the workshop groups where services are performed. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ | select drama_workshop_groups.store_phone , drama_workshop_groups.store_email_address from drama_workshop_groups join services on drama_workshop_groups.workshop_group_id = services.workshop_group_id" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of workshop groups in which services with product name \"film\" are performed? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_phone , drama_workshop_groups.store_email_address from drama_workshop_groups join services on drama_workshop_groups.workshop_group_id = services.workshop_group_id where services.product_name = 'film'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the workshop groups where services with product name \"film\" are performed. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_phone , drama_workshop_groups.store_email_address from drama_workshop_groups join services on drama_workshop_groups.workshop_group_id = services.workshop_group_id where services.product_name = 'film'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different product names? What is the average product price for each of them? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select product_name , avg ( product_price ) from products group by product_name" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each distinct product name, show its average product price. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select product_name , avg ( product_price ) from products group by product_name" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the product names with average product price smaller than 1000000? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) < _ | select product_name from products group by product_name having avg ( product_price ) < 1000000" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the product names whose average product price is below 1000000. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having avg ( _ ) < _ | select product_name from products group by product_name having avg ( product_price ) < 1000000" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total order quantities of photo products? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from order_items join products on order_items.product_id = products.product_id where products.product_name = 'photo'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the total order quantities of the product \"photo\". | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from order_items join products on order_items.product_id = products.product_id where products.product_name = 'photo'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the order details of the products with price higher than 2000? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_items.other_item_details from order_items join products on order_items.product_id = products.product_id where products.product_price > 2000" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the order detail for the products with price above 2000. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_items.other_item_details from order_items join products on order_items.product_id = products.product_id where products.product_price > 2000" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the actual delivery dates of orders with quantity 1? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_orders.actual_delivery_date from customer_orders join order_items on customer_orders.order_id = order_items.order_id where order_items.order_quantity = 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the actual delivery date for all the orders with quantity 1 | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_orders.actual_delivery_date from customer_orders join order_items on customer_orders.order_id = order_items.order_id where order_items.order_quantity = 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the order dates of orders with price higher than 1000? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_orders.order_date from customer_orders join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_price > 1000" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the order dates of the orders with price above 1000. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_orders.order_date from customer_orders join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_price > 1000" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct currency codes are there for all drama workshop groups? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct currency_code ) from drama_workshop_groups" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct currency codes used in drama workshop groups. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct currency_code ) from drama_workshop_groups" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the drama workshop groups with address in Feliciaberg city? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_name from addresses join drama_workshop_groups on addresses.address_id = drama_workshop_groups.address_id where addresses.city_town = 'Feliciaberg'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the the names of the drama workshop groups that are located in Feliciaberg city. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_name from addresses join drama_workshop_groups on addresses.address_id = drama_workshop_groups.address_id where addresses.city_town = 'Feliciaberg'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the email addresses of the drama workshop groups with address in Alaska state? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_email_address from addresses join drama_workshop_groups on addresses.address_id = drama_workshop_groups.address_id where addresses.state_county = 'Alaska'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the email addresses of the drama workshop groups located in Alaska state. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_email_address from addresses join drama_workshop_groups on addresses.address_id = drama_workshop_groups.address_id where addresses.state_county = 'Alaska'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all cities along with the number of drama workshop groups in each city. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select addresses.city_town , count ( * ) from addresses join drama_workshop_groups on addresses.address_id = drama_workshop_groups.address_id group by addresses.city_town" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many drama workshop groups are there in each city? Return both the city and the count. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select addresses.city_town , count ( * ) from addresses join drama_workshop_groups on addresses.address_id = drama_workshop_groups.address_id group by addresses.city_town" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the marketing region code that has the most drama workshop groups? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select marketing_region_code from drama_workshop_groups group by marketing_region_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which marketing region has the most drama workshop groups? Give me the region code. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select marketing_region_code from drama_workshop_groups group by marketing_region_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all cities where at least one customer lives in but no performer lives in. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select addresses.city_town from addresses join customers on addresses.address_id = performers.address_id except select addresses.city_town from addresses join performers on addresses.address_id = performers.address_id" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have at least one customer but no performer? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select addresses.city_town from addresses join customers on addresses.address_id = performers.address_id except select addresses.city_town from addresses join performers on addresses.address_id = performers.address_id" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most frequent status of bookings? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select status_code from bookings group by status_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which status code is the most common of all the bookings? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select status_code from bookings group by status_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the workshop groups that have bookings with status code \"stop\"? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_name from bookings join drama_workshop_groups on bookings.workshop_group_id = drama_workshop_groups.workshop_group_id where bookings.status_code = 'stop'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which workshop groups have bookings with status code \"stop\"? Give me the names. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select drama_workshop_groups.store_name from bookings join drama_workshop_groups on bookings.workshop_group_id = drama_workshop_groups.workshop_group_id where bookings.status_code = 'stop'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of all the clients with no booking. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_name from clients except select clients.customer_name from bookings join clients on bookings.customer_id = clients.client_id" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the clients who do not have any booking? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_name from clients except select clients.customer_name from bookings join clients on bookings.customer_id = clients.client_id" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average quantities ordered with payment method code \"MasterCard\" on invoices? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( order_quantity ) from invoices where payment_method_code = 'MasterCard'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\". | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( order_quantity ) from invoices where payment_method_code = 'MasterCard'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the product ID of the most frequently ordered item on invoices? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select product_id from invoices group by product_id order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the product ordered the most often on invoices. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select product_id from invoices group by product_id order by count ( * ) desc limit 1" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the service type which offers both the photo product and the film product? | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select ref_service_types.service_type_description from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code where services.product_name = 'photo' intersect select ref_service_types.service_type_description from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code where services.product_name = 'film'" }, { "db_id": "cre_Drama_Workshop_Groups", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the description of the service type that offers not only the photo product but also the film product. | ref_payment_methods : payment_method_code , payment_method_description | ref_service_types : service_type_code , parent_service_type_code , service_type_description | addresses : address_id , line_1 , line_2 , city_town , state_county , other_details | products : product_id , product_name , product_price , product_description , other_product_service_details | marketing_regions : marketing_region_code , marketing_region_name , marketing_region_descriptrion , other_details | clients : client_id , address_id , customer_email_address , customer_name , customer_phone , other_details | drama_workshop_groups : workshop_group_id , address_id , currency_code , marketing_region_code , store_name , store_phone , store_email_address , other_details | performers : performer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | customers : customer_id , address_id , customer_name , customer_phone , customer_email_address , other_details | stores : store_id , address_id , marketing_region_code , store_name , store_phone , store_email_address , other_details | bookings : booking_id , customer_id , workshop_group_id , status_code , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | performers_in_bookings : order_id , performer_id | customer_orders : order_id , customer_id , store_id , order_date , planned_delivery_date , actual_delivery_date , other_order_details | order_items : order_item_id , order_id , product_id , order_quantity , other_item_details | invoices : invoice_id , order_id , payment_method_code , product_id , order_quantity , other_item_details , order_item_id | services : service_id , service_type_code , workshop_group_id , product_description , product_name , product_price , other_product_service_details | bookings_services : order_id , product_id | invoice_items : invoice_item_id , invoice_id , order_id , order_item_id , product_id , order_quantity , other_item_details | clients.address_id = addresses.address_id | drama_workshop_groups.address_id = addresses.address_id | performers.address_id = addresses.address_id | customers.address_id = addresses.address_id | stores.marketing_region_code = marketing_regions.marketing_region_code | stores.address_id = addresses.address_id | bookings.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings.customer_id = clients.client_id | performers_in_bookings.order_id = bookings.booking_id | performers_in_bookings.performer_id = performers.performer_id | customer_orders.store_id = stores.store_id | customer_orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = customer_orders.order_id | invoices.payment_method_code = ref_payment_methods.payment_method_code | invoices.order_id = bookings.booking_id | invoices.order_id = customer_orders.order_id | services.service_type_code = ref_service_types.service_type_code | services.workshop_group_id = drama_workshop_groups.workshop_group_id | bookings_services.product_id = services.service_id | bookings_services.order_id = bookings.booking_id | invoice_items.order_id = bookings_services.order_id | invoice_items.product_id = bookings_services.product_id | invoice_items.invoice_id = invoices.invoice_id | invoice_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select ref_service_types.service_type_description from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code where services.product_name = 'photo' intersect select ref_service_types.service_type_description from ref_service_types join services on ref_service_types.service_type_code = services.service_type_code where services.product_name = 'film'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many bands are there? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from band" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of bands. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from band" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the labels? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ | select distinct label from albums" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different album labels listed? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ | select distinct label from albums" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the albums in 2012. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select * from albums where year = 2012" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: return all columns of the albums created in the year of 2012. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select * from albums where year = 2012" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the stage positions of the musicians with first name \"Solveig\" | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct performance.stageposition from performance join band on performance.bandmate = band.id where firstname = 'Solveig'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different stage positions for all musicians whose first name is \"Solveig\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct performance.stageposition from performance join band on performance.bandmate = band.id where firstname = 'Solveig'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs are there? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from songs" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of songs. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from songs" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the songs performed by artist with last name \"Heilo\" | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where band.lastname = 'Heilo'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the songs by the artist whose last name is \"Heilo\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where band.lastname = 'Heilo'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Hom many musicians performed in the song \"Flash\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Flash'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many musicians play in the song \"Flash\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Flash'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the songs produced by artists with first name \"Marianne\". | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where band.firstname = 'Marianne'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all songs produced by the artist with the first name \"Marianne\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where band.firstname = 'Marianne'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who performed the song named \"Badlands\"? Show the first name and the last name. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the artist who perfomed the song \"Badlands\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is performing in the back stage position for the song \"Badlands\"? Show the first name and the last name. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Badlands' and performance.stageposition = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of the performer who was in the back stage position for the song \"Badlands\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Badlands' and performance.stageposition = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many unique labels are there for albums? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct label ) from albums" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the unique labels for the albums? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct label ) from albums" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the label that has the most albums? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select label from albums group by label order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the label with the most albums? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select label from albums group by label order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the musician that have produced the most number of songs? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid group by lastname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the musician who was in the most songs? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid group by lastname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the musician that has been at the back position the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select band.lastname from performance join band on performance.bandmate = band.id where stageposition = 'back' group by lastname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the musicians who has played back position the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select band.lastname from performance join band on performance.bandmate = band.id where stageposition = 'back' group by lastname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the songs whose name contains the word \"the\". | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from songs where title like '% the %'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the songs whose title has the word \"the\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ like _ | select title from songs where title like '% the %'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the instruments used? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ | select distinct instrument from instruments" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different instruments listed in the database? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ | select distinct instrument from instruments" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What instrument did the musician with last name \"Heilo\" use in the song \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instruments.instrument from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid join instruments on instruments.songid = songs.songid and instruments.bandmateid = band.id where band.lastname = 'Heilo' and songs.title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What instruments did the musician with the last name \"Heilo\" play in the song \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instruments.instrument from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid join instruments on instruments.songid = songs.songid and instruments.bandmateid = band.id where band.lastname = 'Heilo' and songs.title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most used instrument? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select instrument from instruments group by instrument order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What instrument is used the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select instrument from instruments group by instrument order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs have used the instrument \"drums\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from instruments where instrument = 'drums'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs use drums as an instrument? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from instruments where instrument = 'drums'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What instruments does the the song \"Le Pop\" use? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instrument from instruments join songs on instruments.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the instruments are used in the song \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instrument from instruments join songs on instruments.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many instruments does the song \"Le Pop\" use? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct instrument ) from instruments join songs on instruments.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different instruments are used in the song \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct instrument ) from instruments join songs on instruments.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many instrument does the musician with last name \"Heilo\" use? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct instrument ) from instruments join band on instruments.bandmateid = band.id where band.lastname = 'Heilo'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different instruments does the musician with the last name \"Heilo\" use? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct instrument ) from instruments join band on instruments.bandmateid = band.id where band.lastname = 'Heilo'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the instruments ever used by the musician with last name \"Heilo\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instrument from instruments join band on instruments.bandmateid = band.id where band.lastname = 'Heilo'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the instruments used by the musician with the last name \"Heilo\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instrument from instruments join band on instruments.bandmateid = band.id where band.lastname = 'Heilo'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which song has the most vocals? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select title from vocals join songs on vocals.songid = songs.songid group by vocals.songid order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the song with the most vocals? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select title from vocals join songs on vocals.songid = songs.songid group by vocals.songid order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which vocal type is the most frequently appearring type? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select type from vocals group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of vocables that appears most frequently? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select type from vocals group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which vocal type has the band mate with last name \"Heilo\" played the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select type from vocals join band on vocals.bandmate = band.id where lastname = 'Heilo' group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of vocals that the band member with the last name \"Heilo\" played the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select type from vocals join band on vocals.bandmate = band.id where lastname = 'Heilo' group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the vocal types used in song \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of vocals used in the song \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of vocal types used in song \"Demon Kitty Rag\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from vocals join songs on vocals.songid = songs.songid where title = 'Demon Kitty Rag'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of vocals used in the song \"Demon Kitty Rag\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from vocals join songs on vocals.songid = songs.songid where title = 'Demon Kitty Rag'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs have a lead vocal? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct title ) from vocals join songs on vocals.songid = songs.songid where type = 'lead'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs have vocals of type lead? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct title ) from vocals join songs on vocals.songid = songs.songid where type = 'lead'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which vocal type did the musician with first name \"Solveig\" played in the song with title \"A Bar in Amsterdam\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid join band on vocals.bandmate = band.id where band.firstname = 'Solveig' and songs.title = 'A Bar In Amsterdam'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of vocals that the musician with the first name \"Solveig\" played in the song \"A Bar in Amsterdam\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid join band on vocals.bandmate = band.id where band.firstname = 'Solveig' and songs.title = 'A Bar In Amsterdam'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the songs that do not have a lead vocal. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from vocals join songs on vocals.songid = songs.songid except select songs.title from vocals join songs on vocals.songid = songs.songid where type = 'lead'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the songs without a lead vocal? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from vocals join songs on vocals.songid = songs.songid except select songs.title from vocals join songs on vocals.songid = songs.songid where type = 'lead'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the vocal types. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ | select distinct type from vocals" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different types of vocals? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ | select distinct type from vocals" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the albums produced in year 2010? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select * from albums where year = 2010" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What information is there on albums from 2010? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select * from albums where year = 2010" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who performed the song named \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of artist who performed \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the musician that have produced the most songs? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid group by lastname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the artist who sang the most songs? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid group by lastname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What instrument did the musician with last name \"Heilo\" use in the song \"Badlands\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instruments.instrument from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid join instruments on instruments.songid = songs.songid and instruments.bandmateid = band.id where band.lastname = 'Heilo' and songs.title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What instruments did the musician with the last name \"Heilo\" play in \"Badlands\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select instruments.instrument from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid join instruments on instruments.songid = songs.songid and instruments.bandmateid = band.id where band.lastname = 'Heilo' and songs.title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many instruments does the song \"Badlands\" use? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct instrument ) from instruments join songs on instruments.songid = songs.songid where title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different instruments are used in the song \"Badlands\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct instrument ) from instruments join songs on instruments.songid = songs.songid where title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the vocal types used in song \"Badlands\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid where title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What types of vocals are used in the song \"Badlands\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid where title = 'Badlands'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of vocal types used in song \"Le Pop\" | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from vocals join songs on vocals.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many vocal types are used in the song \"Le Pop\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from vocals join songs on vocals.songid = songs.songid where title = 'Le Pop'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs have a shared vocal? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct title ) from vocals join songs on vocals.songid = songs.songid where type = 'shared'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different songs have shared vocals? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct title ) from vocals join songs on vocals.songid = songs.songid where type = 'shared'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the songs that do not have a back vocal. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from vocals join songs on vocals.songid = songs.songid except select songs.title from vocals join songs on vocals.songid = songs.songid where type = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of all songs without back vocals? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from vocals join songs on vocals.songid = songs.songid except select songs.title from vocals join songs on vocals.songid = songs.songid where type = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which vocal type has the band mate with first name \"Solveig\" played the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select type from vocals join band on vocals.bandmate = band.id where firstname = 'Solveig' group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of vocals that the band member with the first name \"Solveig\" played the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select type from vocals join band on vocals.bandmate = band.id where firstname = 'Solveig' group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which vocal type did the musician with last name \"Heilo\" played in the song with title \"Der Kapitan\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid join band on vocals.bandmate = band.id where band.lastname = 'Heilo' and songs.title = 'Der Kapitan'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of vocals that the musician with the last name \"Heilo\" played in \"Der Kapitan\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select type from vocals join songs on vocals.songid = songs.songid join band on vocals.bandmate = band.id where band.lastname = 'Heilo' and songs.title = 'Der Kapitan'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of the band mate that has performed in most songs. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select band.firstname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid group by firstname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of the band mate who perfomed in the most songs? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select band.firstname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid group by firstname order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which vocal type has the band mate with first name \"Marianne\" played the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select type from vocals join band on vocals.bandmate = band.id where firstname = 'Marianne' group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the vocal type of the band mate whose first name is \"Marianne\" played the most? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select type from vocals join band on vocals.bandmate = band.id where firstname = 'Marianne' group by type order by count ( * ) desc limit 1" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is performing in the back stage position for the song \"Der Kapitan\"? Show the first name and last name. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Der Kapitan' and performance.stageposition = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the artist who performed back stage for the song \"Der Kapitan\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select band.firstname , band.lastname from performance join band on performance.bandmate = band.id join songs on songs.songid = performance.songid where songs.title = 'Der Kapitan' and performance.stageposition = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of songs that does not have a back vocal. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from vocals join songs on vocals.songid = songs.songid except select songs.title from vocals join songs on vocals.songid = songs.songid where type = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the songs that do not have back vocals? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect distinct _ from _ except select _ from _ where _ | select distinct title from vocals join songs on vocals.songid = songs.songid except select songs.title from vocals join songs on vocals.songid = songs.songid where type = 'back'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the songs in album \"A Kiss Before You Go: Live in Hamburg\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.title = 'A Kiss Before You Go: Live in Hamburg'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the song titles on the album \"A Kiss Before You Go: Live in Hamburg\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.title = 'A Kiss Before You Go: Live in Hamburg'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the songs in albums under label \"Universal Music Group\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.label = 'Universal Music Group'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the songs whose album is under the label of \"Universal Music Group\"? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect _ from _ where _ | select songs.title from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.label = 'Universal Music Group'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of songs in all the studio albums. | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct songs.title ) from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.type = 'Studio'" }, { "db_id": "music_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many songs appear in studio albums? | songs : songid , title | albums : aid , title , year , label , type | band : id , firstname , lastname | instruments : songid , bandmateid , instrument | performance : songid , bandmate , stageposition | tracklists : albumid , position , songid | vocals : songid , bandmate , type | instruments.bandmateid = band.id | instruments.songid = songs.songid | performance.bandmate = band.id | performance.songid = songs.songid | tracklists.albumid = albums.aid | tracklists.songid = songs.songid | vocals.bandmate = band.id | vocals.songid = songs.songid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct songs.title ) from albums join tracklists on albums.aid = tracklists.albumid join songs on tracklists.songid = songs.songid where albums.type = 'Studio'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the founder of Sony? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ | select founder from manufacturers where name = 'Sony'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the founder of Sony. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ | select founder from manufacturers where name = 'Sony'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Where is the headquarter of the company founded by James? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ | select headquarter from manufacturers where founder = 'James'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the headquarter of the company whose founder is James? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ | select headquarter from manufacturers where founder = 'James'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , headquarter from manufacturers order by revenue desc" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and headquarters of all manufacturers, ordered by revenue descending? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , headquarter from manufacturers order by revenue desc" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average, maximum and total revenues of all companies? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , sum ( _ ) from _ | select avg ( revenue ) , max ( revenue ) , sum ( revenue ) from manufacturers" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average, maximum, and total revenues across all manufacturers. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , sum ( _ ) from _ | select avg ( revenue ) , max ( revenue ) , sum ( revenue ) from manufacturers" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many companies were created by Andy? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from manufacturers where founder = 'Andy'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the number of companies created by Andy. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from manufacturers where founder = 'Andy'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total revenue created by the companies whose headquarter is located at Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( revenue ) from manufacturers where headquarter = 'Austin'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the sum of revenue from companies with headquarters in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( revenue ) from manufacturers where headquarter = 'Austin'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different cities listed? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect distinct _ from _ | select distinct headquarter from manufacturers" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the distinct headquarters of manufacturers. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect distinct _ from _ | select distinct headquarter from manufacturers" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of manufactures that are based in Tokyo or Beijing. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Beijing'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many manufacturers have headquarters in either Tokyo or Beijing? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Beijing'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the founder of the company whose name begins with the letter 'S'. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ like _ | select founder from manufacturers where name like 'S%'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the founders of companies whose first letter is S? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ like _ | select founder from manufacturers where name like 'S%'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of companies whose revenue is between 100 and 150. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from manufacturers where revenue between 100 and 150" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of companies with revenue between 100 and 150? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from manufacturers where revenue between 100 and 150" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total revenue of all companies whose main office is at Tokyo or Taiwan? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( revenue ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Taiwan'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the total revenue of companies with headquarters in Tokyo or Taiwan. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( revenue ) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Taiwan'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of product that is produced by both companies Creative Labs and Sony. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Creative Labs' intersect select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of products produced by both Creative Labs and Sony? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Creative Labs' intersect select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, headquarter and founder of the manufacturer that has the highest revenue. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , headquarter , founder from manufacturers order by revenue desc limit 1" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, headquarters and founders of the company with the highest revenue? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , headquarter , founder from manufacturers order by revenue desc limit 1" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , headquarter , revenue from manufacturers order by revenue desc" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, headquarters and revenues for manufacturers, sorted by revenue descending? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ desc | select name , headquarter , revenue from manufacturers order by revenue desc" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of companies whose revenue is greater than the average revenue of all companies. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from manufacturers where revenue > ( select avg ( revenue ) from manufacturers )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of manufacturers with revenue greater than the average of all revenues? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from manufacturers where revenue > ( select avg ( revenue ) from manufacturers )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select name from manufacturers where revenue < ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select name from manufacturers where revenue < ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) from _ where _ > ( select min ( _ ) from _ where _ ) | select sum ( revenue ) from manufacturers where revenue > ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) from _ where _ > ( select min ( _ ) from _ where _ ) | select sum ( revenue ) from manufacturers where revenue > ( select min ( revenue ) from manufacturers where headquarter = 'Austin' )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total revenue of companies of each founder. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( revenue ) , founder from manufacturers group by founder" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total revenue of companies started by founder? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( revenue ) , founder from manufacturers group by founder" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and revenue of the company that earns the highest revenue in each city. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ , max ( _ ) , _ from _ group by _ | select name , max ( revenue ) , headquarter from manufacturers group by headquarter" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and revenues of the companies with the highest revenues in each headquarter city? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ , max ( _ ) , _ from _ group by _ | select name , max ( revenue ) , headquarter from manufacturers group by headquarter" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total revenue for each manufacturer. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( revenue ) , name from manufacturers group by name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total revenue of each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect sum ( _ ) , _ from _ group by _ | select sum ( revenue ) , name from manufacturers group by name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average prices of all products from each manufacture, and list each company's name. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average prices of products for each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of different products that are produced by companies at different headquarter cities. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ | select count ( distinct products.name ) , manufacturers.headquarter from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.headquarter" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different products are produced in each headquarter city? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( distinct _ ) , _ from _ group by _ | select count ( distinct products.name ) , manufacturers.headquarter from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.headquarter" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find number of products which Sony does not make. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct name ) from products where name not in ( select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony' )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are not made by Sony? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( distinct name ) from products where name not in ( select products.name from products join manufacturers on products.manufacturer = manufacturers.code where manufacturers.name = 'Sony' )" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of companies that do not make DVD drive. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from manufacturers except select manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code where products.name = 'DVD drive'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of companies that do not make DVD drives? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select name from manufacturers except select manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code where products.name = 'DVD drive'" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of products for each manufacturer, showing the name of each company. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are there for each manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the names of all the products in the store. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ | select name from products" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all products? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ | select name from products" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the names and the prices of all the products in the store. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ | select name , price from products" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and prices of all products in the store? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ | select name , price from products" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the name of the products with a price less than or equal to $200. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ | select name from products where price <= 200" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of products with price at most 200? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ | select name from products where price <= 200" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all information of all the products with a price between $60 and $120. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select * from products where price between 60 and 120" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the information of all the products that have a price between 60 and 120? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select * from products where price between 60 and 120" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average price of all the products. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( price ) from products" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price across all products? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( price ) from products" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average price of all products with manufacturer code equal to 2. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price ) from products where manufacturer = 2" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price of products with manufacturer codes equal to 2? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price ) from products where manufacturer = 2" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the number of products with a price larger than or equal to $180. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products where price >= 180" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products have prices of at least 180? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products where price >= 180" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order). | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ order by _ desc , _ asc | select name , price from products where price >= 180 order by price desc , name asc" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ where _ order by _ desc , _ asc | select name , price from products where price >= 180 order by price desc , name asc" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select all the data from the products and each product's manufacturer. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ | select * from products join manufacturers on products.manufacturer = manufacturers.code" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is all the product data, as well as each product's manufacturer? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ | select * from products join manufacturers on products.manufacturer = manufacturers.code" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the average price of each manufacturer's products, showing only the manufacturer's code. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( price ) , manufacturer from products group by manufacturer" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average prices of products, grouped by manufacturer code? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( price ) , manufacturer from products group by manufacturer" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the average price of each manufacturer's products, showing the manufacturer's name. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average prices of products, grouped by manufacturer name? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the names of manufacturer whose products have an average price higher than or equal to $150. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ having avg ( _ ) >= _ | select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name having avg ( products.price ) >= 150" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and average prices of products for manufacturers whose products cost on average 150 or more? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ having avg ( _ ) >= _ | select avg ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name having avg ( products.price ) >= 150" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the name and price of the cheapest product. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , price from products order by price asc limit 1" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and price of the cheapest product? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , price from products order by price asc limit 1" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the name of each manufacturer along with the name and price of its most expensive product. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ , max ( _ ) , _ from _ group by _ | select products.name , max ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each manufacturer name, what are the names and prices of their most expensive product? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ , max ( _ ) , _ from _ group by _ | select products.name , max ( products.price ) , manufacturers.name from products join manufacturers on products.manufacturer = manufacturers.code group by manufacturers.name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the code of the product that is cheapest in each product category. | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select code , name , min ( price ) from products group by name" }, { "db_id": "manufactory_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes and names of the cheapest products in each category? | manufacturers : code , name , headquarter , founder , revenue | products : code , name , price , manufacturer | products.manufacturer = manufacturers.code | \n\n### Response:\n\nselect _ , min ( _ ) from _ group by _ | select code , name , min ( price ) from products group by name" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the problem log that is created most recently? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select problem_log_id from problem_log order by log_entry_date desc limit 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which problem log was created most recently? Give me the log id. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select problem_log_id from problem_log order by log_entry_date desc limit 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the oldest log id and its corresponding problem id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select problem_log_id , problem_id from problem_log order by log_entry_date asc limit 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the oldest log id and its corresponding problem id. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select problem_log_id , problem_id from problem_log order by log_entry_date asc limit 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the ids and dates of the logs for the problem whose id is 10. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problem_log_id , log_entry_date from problem_log where problem_id = 10" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For the problem with id 10, return the ids and dates of its problem logs. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problem_log_id , log_entry_date from problem_log where problem_id = 10" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the log ids and their descriptions from the problem logs. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ | select problem_log_id , log_entry_description from problem_log" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the log id and entry description of each problem? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ | select problem_log_id , log_entry_description from problem_log" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first and last names of all distinct staff members who are assigned to the problem whose id is 1. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct staff_first_name , staff_last_name from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where problem_log.problem_id = 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which staff members are assigned to the problem with id 1? Give me their first and last names. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct staff_first_name , staff_last_name from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where problem_log.problem_id = 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the problem id and log id which are assigned to the staff named Rylan Homenick. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct problem_log.problem_id , problem_log.problem_log_id from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which problem id and log id are assigned to the staff named Rylan Homenick? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct problem_log.problem_id , problem_log.problem_log_id from staff join problem_log on staff.staff_id = problem_log.assigned_to_staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many problems are there for product voluptatem? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from product join problems on product.product_id = problems.product_id where product.product_name = 'voluptatem'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many problems did the product called \"voluptatem\" have in record? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from product join problems on product.product_id = problems.product_id where product.product_name = 'voluptatem'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many problems does the product with the most problems have? List the number of the problems and product name. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc limit _ | select count ( * ) , product.product_name from product join problems on product.product_id = problems.product_id group by product.product_name order by count ( * ) desc limit 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which product has the most problems? Give me the number of problems and the product name. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc limit _ | select count ( * ) , product.product_name from product join problems on product.product_id = problems.product_id group by product.product_name order by count ( * ) desc limit 1" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problems.problem_description from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which problems are reported by the staff with first name \"Christop\"? Show the descriptions of the problems. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problems.problem_description from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of the problems that are reported by the staff whose last name is Bosco. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_last_name = 'Bosco'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which problems are reported by the staff with last name \"Bosco\"? Show the ids of the problems. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_last_name = 'Bosco'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the problems which are reported after 1978-06-26? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problem_id from problems where date_problem_reported > '1978-06-26'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of the problems reported after 1978-06-26. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problem_id from problems where date_problem_reported > '1978-06-26'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the problems which are reported before 1978-06-26? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problem_id from problems where date_problem_reported < '1978-06-26'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which problems are reported before 1978-06-26? Give me the ids of the problems. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problem_id from problems where date_problem_reported < '1978-06-26'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each product which has problems, what are the number of problems and the product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id group by product.product_id" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each product with some problems, list the count of problems and the product id. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id group by product.product_id" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each product that has problems, find the number of problems reported after 1986-11-13 and the product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id where problems.date_problem_reported > '1986-11-13' group by product.product_id" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , product.product_id from problems join product on problems.product_id = product.product_id where problems.date_problem_reported > '1986-11-13' group by product.product_id" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all the distinct product names in alphabetical order? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct product_name from product order by product_name asc" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort all the distinct product names in alphabetical order. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct product_name from product order by product_name asc" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the distinct product names ordered by product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct product_name from product order by product_id asc" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the list of distinct product names sorted by product id? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct product_name from product order by product_id asc" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the id of problems reported by the staff named Dameon Frami or Jolie Weber? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Dameon' and staff.staff_last_name = 'Frami' union select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Jolie' and staff.staff_last_name = 'Weber'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Dameon' and staff.staff_last_name = 'Frami' union select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Jolie' and staff.staff_last_name = 'Weber'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop' and staff.staff_last_name = 'Berge' intersect select product_id from problems join staff on problems.closure_authorised_by_staff_id = staff.staff_id where staff.staff_first_name = 'Ashley' and staff.staff_last_name = 'Medhurst'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select product_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Christop' and staff.staff_last_name = 'Berge' intersect select product_id from problems join staff on problems.closure_authorised_by_staff_id = staff.staff_id where staff.staff_first_name = 'Ashley' and staff.staff_last_name = 'Medhurst'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported < ( select min ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lysanne' and staff.staff_last_name = 'Turcotte' )" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported < ( select min ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lysanne' and staff.staff_last_name = 'Turcotte' )" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the problems reported after the date of any problems reported by Rylan Homenick? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported > ( select max ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick' )" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select problems.problem_id from problems join staff on problems.reported_by_staff_id = staff.staff_id where date_problem_reported > ( select max ( date_problem_reported ) from problems join staff on problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Rylan' and staff.staff_last_name = 'Homenick' )" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the top 3 products which have the largest number of problems? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select product.product_name from problems join product on problems.product_id = product.product_id group by product.product_name order by count ( * ) desc limit 3" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the three products that have the most problems?s | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select product.product_name from problems join product on problems.product_id = product.product_id group by product.product_name order by count ( * ) desc limit 3" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the ids of the problems from the product \"voluptatem\" that are reported after 1995? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problems.problem_id from problems join product on problems.product_id = product.product_id where product.product_name = 'voluptatem' and problems.date_problem_reported > '1995'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the problems that are from the product \"voluptatem\" and are reported after 1995? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select problems.problem_id from problems join product on problems.product_id = product.product_id where product.product_name = 'voluptatem' and problems.date_problem_reported > '1995'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of the staff members who reported problems from the product \"rem\" but not \"aut\"? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'rem' except select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'aut'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which staff members who reported problems from the product \"rem\" but not \"aut\"? Give me their first and last names. | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'rem' except select staff.staff_first_name , staff.staff_last_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where product.product_name = 'aut'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the products which have problems reported by both Lacey Bosco and Kenton Champlin? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select product.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lacey' and staff.staff_last_name = 'Bosco' intersect select product.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Kenton' and staff.staff_last_name = 'Champlin'" }, { "db_id": "tracking_software_problems", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin? | problem_category_codes : problem_category_code , problem_category_description | problem_log : problem_log_id , assigned_to_staff_id , problem_id , problem_category_code , problem_status_code , log_entry_date , log_entry_description , log_entry_fix , other_log_details | problem_status_codes : problem_status_code , problem_status_description | product : product_id , product_name , product_details | staff : staff_id , staff_first_name , staff_last_name , other_staff_details | problems : problem_id , product_id , closure_authorised_by_staff_id , reported_by_staff_id , date_problem_reported , date_problem_closed , problem_description , other_problem_details | problem_log.problem_status_code = problem_status_codes.problem_status_code | problem_log.problem_id = problems.problem_id | problem_log.assigned_to_staff_id = staff.staff_id | problem_log.problem_category_code = problem_category_codes.problem_category_code | problems.reported_by_staff_id = staff.staff_id | problems.product_id = product.product_id | problems.closure_authorised_by_staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select product.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Lacey' and staff.staff_last_name = 'Bosco' intersect select product.product_name from problems join product join staff on problems.product_id = product.product_id and problems.reported_by_staff_id = staff.staff_id where staff.staff_first_name = 'Kenton' and staff.staff_last_name = 'Champlin'" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many branches where have more than average number of memberships are there? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from branch where membership_amount > ( select avg ( membership_amount ) from branch )" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of branches that have more than the average number of memberships? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from branch where membership_amount > ( select avg ( membership_amount ) from branch )" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show name, address road, and city for all branches sorted by open year. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , address_road , city from branch order by open_year asc" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, address roads, and cities of the branches ordered by opening year? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , address_road , city from branch order by open_year asc" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are names for top three branches with most number of membership? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from branch order by membership_amount desc limit 3" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names for the 3 branches that have the most memberships? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from branch order by membership_amount desc limit 3" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct city where branches with at least 100 memberships are located. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct city from branch where membership_amount >= 100" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different cities that have more than 100 memberships? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct city from branch where membership_amount >= 100" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all open years when at least two shops are opened. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select open_year from branch group by open_year having count ( * ) >= 2" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the opening years in which at least two shops opened? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select open_year from branch group by open_year having count ( * ) >= 2" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ where _ | select min ( membership_amount ) , max ( membership_amount ) from branch where open_year = 2011 or city = 'London'" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) from _ where _ | select min ( membership_amount ) , max ( membership_amount ) from branch where open_year = 2011 or city = 'London'" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the city and the number of branches opened before 2010 for each city. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select city , count ( * ) from branch where open_year < 2010 group by city" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each city, how many branches opened before 2010? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select city , count ( * ) from branch where open_year < 2010 group by city" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different levels do members have? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct level ) from member" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different membership levels? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct level ) from member" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show card number, name, and hometown for all members in a descending order of level. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select card_number , name , hometown from member order by level desc" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the card numbers, names, and hometowns of every member ordered by descending level? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select card_number , name , hometown from member order by level desc" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the membership level with most number of members. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select level from member group by level order by count ( * ) desc limit 1" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the membership level with the most people? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select level from member group by level order by count ( * ) desc limit 1" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all member names and registered branch names sorted by register year. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select member.name , branch.name from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id join member on membership_register_branch.member_id = member.member_id order by membership_register_branch.register_year asc" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the members and branches at which they are registered sorted by year of registration? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select member.name , branch.name from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id join member on membership_register_branch.member_id = member.member_id order by membership_register_branch.register_year asc" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all branch names with the number of members in each branch registered after 2015. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select branch.name , count ( * ) from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id where membership_register_branch.register_year > 2015 group by branch.branch_id" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each branch id, what are the names of the branches that were registered after 2015? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select branch.name , count ( * ) from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id where membership_register_branch.register_year > 2015 group by branch.branch_id" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show member names without any registered branch. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from member where member_id not in ( select member_id from membership_register_branch )" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the members that have never registered at any branch? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from member where member_id not in ( select member_id from membership_register_branch )" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the branch name and city without any registered members. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name , city from branch where branch_id not in ( select branch_id from membership_register_branch )" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and cities of the branches that do not have any registered members? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name , city from branch where branch_id not in ( select branch_id from membership_register_branch )" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and open year for the branch with most number of memberships registered in 2016? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select branch.name , branch.open_year from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id where membership_register_branch.register_year = 2016 group by branch.branch_id order by count ( * ) desc limit 1" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and opening year for the branch that registered the most members in 2016? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select branch.name , branch.open_year from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id where membership_register_branch.register_year = 2016 group by branch.branch_id order by count ( * ) desc limit 1" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the member name and hometown who registered a branch in 2016. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select member.name , member.hometown from membership_register_branch join member on membership_register_branch.member_id = member.member_id where membership_register_branch.register_year = 2016" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the member names and hometowns of those who registered at a branch in 2016? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select member.name , member.hometown from membership_register_branch join member on membership_register_branch.member_id = member.member_id where membership_register_branch.register_year = 2016" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all city with a branch opened in 2001 and a branch with more than 100 membership. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select city from branch where open_year = 2001 and membership_amount > 100" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the cities that have a branch that opened in 2001 and a branch with more than 100 members? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ | select city from branch where open_year = 2001 and membership_amount > 100" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all cities without a branch having more than 100 memberships. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select city from branch except select city from branch where membership_amount > 100" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the cities that do not have any branches with more than 100 members? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select city from branch except select city from branch where membership_amount > 100" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the sum of total pounds of purchase in year 2018 for all branches in London? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( total_pounds ) from purchase join branch on purchase.branch_id = branch.branch_id where branch.city = 'London' and purchase.year = 2018" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many total pounds were purchased in the year 2018 at all London branches? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( total_pounds ) from purchase join branch on purchase.branch_id = branch.branch_id where branch.city = 'London' and purchase.year = 2018" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of purchases for members with level 6? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from purchase join member on purchase.member_id = member.member_id where member.level = 6" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total purchases for members rated at level 6? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from purchase join member on purchase.member_id = member.member_id where member.level = 6" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia. | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select branch.name from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id join member on membership_register_branch.member_id = member.member_id where member.hometown = 'Louisville , Kentucky' intersect select branch.name from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id join member on membership_register_branch.member_id = member.member_id where member.hometown = 'Hiram , Georgia'" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select branch.name from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id join member on membership_register_branch.member_id = member.member_id where member.hometown = 'Louisville , Kentucky' intersect select branch.name from membership_register_branch join branch on membership_register_branch.branch_id = branch.branch_id join member on membership_register_branch.member_id = member.member_id where member.hometown = 'Hiram , Georgia'" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: list the card number of all members whose hometown address includes word \"Kentucky\". | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select card_number from member where hometown like '%Kentucky%'" }, { "db_id": "shop_membership", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the card numbers of members from Kentucky? | member : member_id , card_number , name , hometown , level | branch : branch_id , name , open_year , address_road , city , membership_amount | membership_register_branch : member_id , branch_id , register_year | purchase : member_id , branch_id , year , total_pounds | membership_register_branch.branch_id = branch.branch_id | membership_register_branch.member_id = member.member_id | purchase.branch_id = branch.branch_id | purchase.member_id = member.member_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select card_number from member where hometown like '%Kentucky%'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students in total. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are there in total? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of voting records in total. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many voting records do we have? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct number of president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct president_vote ) from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct president votes are recorded? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct president_vote ) from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum age of all the students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( age ) from student" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the oldest age among the students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( age ) from student" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last names of students with major 50. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select lname from student where major = 50" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of students studying major 50? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select lname from student where major = 50" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of students with age above 22. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname from student where age > 22" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all the students aged above 22? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname from student where age > 22" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the majors of male (sex is M) students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select major from student where sex = 'M'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the major of each male student. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select major from student where sex = 'M'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age of female (sex is F) students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( age ) from student where sex = 'F'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of female students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( age ) from student where sex = 'F'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum age of students with major 600? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( age ) , min ( age ) from student where major = 600" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the ages of the oldest and youngest students studying major 600. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ where _ | select max ( age ) , min ( age ) from student where major = 600" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who are the advisors for students that live in a city with city code \"BAL\"? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select advisor from student where city_code = 'BAL'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the advisors of the students whose city of residence has city code \"BAL\". | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select advisor from student where city_code = 'BAL'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct secretary votes in the fall election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct secretary_vote from voting_record where election_cycle = 'Fall'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all the distinct secretary votes made in the fall election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct secretary_vote from voting_record where election_cycle = 'Fall'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct president votes on 08/30/2015? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct president_vote from voting_record where registration_date = '08/30/2015'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the distinct president votes made on 08/30/2015. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct president_vote from voting_record where registration_date = '08/30/2015'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the distinct registration date and the election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct registration_date , election_cycle from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct registration dates and the election cycles? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct registration_date , election_cycle from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the distinct president vote and the vice president vote. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct president_vote , vice_president_vote from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the distinct president votes and the vice president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct president_vote , vice_president_vote from voting_record" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct last names of the students who have class president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct student.lname from student join voting_record on student.stuid = voting_record.class_president_vote" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct last names of the students who have class president votes? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct student.lname from student join voting_record on student.stuid = voting_record.class_president_vote" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct first names of the students who have class senator votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct student.fname from student join voting_record on student.stuid = voting_record.class_senator_vote" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct first names of the students who have class president votes? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct student.fname from student join voting_record on student.stuid = voting_record.class_senator_vote" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct ages of students who have secretary votes in the fall election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.age from student join voting_record on student.stuid = voting_record.secretary_vote where voting_record.election_cycle = 'Fall'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct ages of students who have secretary votes in the fall election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.age from student join voting_record on student.stuid = voting_record.secretary_vote where voting_record.election_cycle = 'Fall'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct Advisor of students who have treasurer votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.advisor from student join voting_record on student.stuid = voting_record.treasurer_vote where voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who served as an advisor for students who have treasurer votes in the spring election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.advisor from student join voting_record on student.stuid = voting_record.treasurer_vote where voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct majors of students who have treasurer votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct student.major from student join voting_record on student.stuid = voting_record.treasurer_vote" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct majors that students with treasurer votes are studying? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct student.major from student join voting_record on student.stuid = voting_record.treasurer_vote" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last names of all the female (sex is F) students who have president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.president_vote where student.sex = 'F'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all the female students who have president votes? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.president_vote where student.sex = 'F'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of all the students of age 18 who have vice president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.vice_president_vote where student.age = 18" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and last names of the students who are 18 years old and have vice president votes. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct student.fname , student.lname from student join voting_record on student.stuid = voting_record.vice_president_vote where student.age = 18" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many male (sex is M) students have class senator votes in the fall election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.sex = 'M' and voting_record.election_cycle = 'Fall'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of male students who had class senator votes in the fall election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.sex = 'M' and voting_record.election_cycle = 'Fall'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students live in the city with code \"NYC\" and have class senator votes in the spring election cycle? Count the numbers. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join voting_record on student.stuid = class_senator_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of students who live in the city with code \"NYC\" and have secretary votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.city_code = 'NYC' and voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of female (sex is F) students who have secretary votes in the spring election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.sex = 'F' and voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age of the female students with secretary votes in the spring election cycle? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( student.age ) from student join voting_record on student.stuid = secretary_vote where student.sex = 'F' and voting_record.election_cycle = 'Spring'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct first names of all the students who have vice president votes and whose city code is not PIT. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ where _ | select distinct student.fname from student join voting_record on student.stuid = voting_record.vice_president_vote except select distinct fname from student where city_code = 'PIT'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ where _ | select distinct student.fname from student join voting_record on student.stuid = voting_record.vice_president_vote except select distinct fname from student where city_code = 'PIT'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct last names of all the students who have president votes and whose advisor is not 2192. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote except select distinct lname from student where advisor = '2192'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct last names of the students who have president votes but do not have 2192 as the advisor? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ except select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote except select distinct lname from student where advisor = '2192'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct last names of all the students who have president votes and whose advisor is 8741. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ intersect select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote intersect select distinct lname from student where advisor = '8741'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct last names of the students who have president votes and have 8741 as the advisor? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ intersect select distinct _ from _ where _ | select distinct student.lname from student join voting_record on student.stuid = president_vote intersect select distinct lname from student where advisor = '8741'" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each advisor, report the total number of students advised by him or her. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select advisor , count ( * ) from student group by advisor" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students does each advisor have? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select advisor , count ( * ) from student group by advisor" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report all advisors that advise more than 2 students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select advisor from student group by advisor having count ( * ) > 2" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which advisors have more than two students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select advisor from student group by advisor having count ( * ) > 2" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report all majors that have less than 3 students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) < _ | select major from student group by major having count ( * ) < 3" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the majors only less than three students are studying? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) < _ | select major from student group by major having count ( * ) < 3" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each election cycle, report the number of voting records. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select election_cycle , count ( * ) from voting_record group by election_cycle" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of voting records for each election cycle. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select election_cycle , count ( * ) from voting_record group by election_cycle" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which major has the most students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select major from student group by major order by count ( * ) desc limit 1" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the major that is studied by the largest number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select major from student group by major order by count ( * ) desc limit 1" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common major among female (sex is F) students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select major from student where sex = 'F' group by major order by count ( * ) desc limit 1" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the major that is studied by the most female students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select major from student where sex = 'F' group by major order by count ( * ) desc limit 1" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the city_code of the city that the most students live in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select city_code from student group by city_code order by count ( * ) desc limit 1" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the code of the city that has the most students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select city_code from student group by city_code order by count ( * ) desc limit 1" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Report the distinct advisors who have more than 2 students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select advisor from student group by advisor having count ( * ) > 2" }, { "db_id": "voter_2", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which advisors are advising more than 2 students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | voting_record : stuid , registration_date , election_cycle , president_vote , vice_president_vote , secretary_vote , treasurer_vote , class_president_vote , class_senator_vote | voting_record.class_senator_vote = student.stuid | voting_record.class_president_vote = student.stuid | voting_record.treasurer_vote = student.stuid | voting_record.secretary_vote = student.stuid | voting_record.vice_president_vote = student.stuid | voting_record.president_vote = student.stuid | voting_record.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select advisor from student group by advisor having count ( * ) > 2" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are there? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from products" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from products" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many colors are there? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_colors" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of colors. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_colors" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many characteristics are there? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from characteristics" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of characteristics. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from characteristics" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and buying prices of all the products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ | select product_name , typical_buying_price from products" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names and typical buying prices for all products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ | select product_name , typical_buying_price from products" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the description of all the colors. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ | select color_description from ref_colors" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the descriptions for each color? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ | select color_description from ref_colors" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all the product characteristics. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct characteristic_name from characteristics" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different names of the product characteristics? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct characteristic_name from characteristics" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of products with category \"Spices\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_name from products where product_category_code = 'Spices'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of products in the category 'Spices'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_name from products where product_category_code = 'Spices'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names, color descriptions and product descriptions of products with category \"Herbs\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name , ref_colors.color_description , products.product_description from products join ref_colors on products.color_code = ref_colors.color_code where product_category_code = 'Herbs'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, color descriptions, and product descriptions for products in the 'Herbs' category? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name , ref_colors.color_description , products.product_description from products join ref_colors on products.color_code = ref_colors.color_code where product_category_code = 'Herbs'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are there under the category \"Seeds\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products where product_category_code = 'Seeds'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of products in the category 'Seeds'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products where product_category_code = 'Seeds'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of products with category \"Spices\" and typically sold above 1000. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products where product_category_code = 'Spices' and typical_buying_price > 1000" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products are in the 'Spices' category and have a typical price of over 1000? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products where product_category_code = 'Spices' and typical_buying_price > 1000" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the category and typical buying price of the product with name \"cumin\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_code , typical_buying_price from products where product_name = 'cumin'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the category code and typical price of 'cumin'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_code , typical_buying_price from products where product_name = 'cumin'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which category does the product named \"flax\" belong to? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_code from products where product_name = 'flax'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the code of the category that the product with the name 'flax' belongs to? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_code from products where product_name = 'flax'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the product with the color description 'yellow'? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name from products join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'yellow'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name of the products that have a color description 'yellow'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name from products join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'yellow'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the category descriptions of the products whose descriptions include letter 't'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select ref_product_categories.product_category_description from ref_product_categories join products on ref_product_categories.product_category_code = products.product_category_code where products.product_description like '%t%'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the descriptions of the categories that products with product descriptions that contain the letter t are in? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select ref_product_categories.product_category_description from ref_product_categories join products on ref_product_categories.product_category_code = products.product_category_code where products.product_description like '%t%'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the color description of the product with name \"catnip\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code where products.product_name = 'catnip'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the color description for the product 'catnip'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code where products.product_name = 'catnip'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the color code and description of the product named \"chervil\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.color_code , ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code where products.product_name = 'chervil'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the color code and description for the product with the name 'chervil'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.color_code , ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code where products.product_name = 'chervil'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and color description of the products with at least 2 characteristics. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select products.product_id , ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code join product_characteristics on products.product_id = product_characteristics.product_id group by products.product_id having count ( * ) >= 2" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the product ids and color descriptions for products with two or more characteristics? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select products.product_id , ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code join product_characteristics on products.product_id = product_characteristics.product_id group by products.product_id having count ( * ) >= 2" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the product names with the color description \"white\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name from products join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'white'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of products with 'white' as their color description? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name from products join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'white'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and typical buying and selling prices of the products that have color described as \"yellow\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name , products.typical_buying_price , products.typical_selling_price from products join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'yellow'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names and typical buying and selling prices for products that have 'yellow' as their color description. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name , products.typical_buying_price , products.typical_selling_price from products join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'yellow'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many characteristics does the product named \"sesame\" have? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id where products.product_name = 'sesame'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of characteristics the product 'sesame' has. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id where products.product_name = 'sesame'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct characteristic names does the product \"cumin\" have? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct characteristics.characteristic_name ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'sesame'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different characteristic names the product 'cumin' has. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct characteristics.characteristic_name ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'sesame'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the characteristic names of product \"sesame\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'sesame'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the characteristic names of the 'sesame' product. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'sesame'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the characteristic names and data types of product \"cumin\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select characteristics.characteristic_name , characteristics.characteristic_data_type from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'cumin'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and data types of the characteristics of the 'cumin' product? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select characteristics.characteristic_name , characteristics.characteristic_data_type from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'cumin'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all characteristics of product named \"sesame\" with type code \"Grade\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'sesame' and characteristics.characteristic_type_code = 'Grade'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'sesame' and characteristics.characteristic_type_code = 'Grade'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many characteristics does the product named \"laurel\" have? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'laurel'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of characteristics of the product named 'laurel'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'laurel'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of characteristics that the product \"flax\" has. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'flax'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of characteristics of the 'flax' product. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where products.product_name = 'flax'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the products that have the color description \"red\" and have the characteristic name \"fast\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'red' and characteristics.characteristic_name = 'fast'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the products that have a color description of 'red' and the 'fast' characteristic? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'red' and characteristics.characteristic_name = 'fast'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products have the characteristic named \"hot\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where characteristics.characteristic_name = 'hot'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of products with the 'hot' charactersitic. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where characteristics.characteristic_name = 'hot'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the all the distinct names of the products with the characteristic name 'warm'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct products.product_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where characteristics.characteristic_name = 'warm'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different product names for products that have the 'warm' characteristic:? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct products.product_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id where characteristics.characteristic_name = 'warm'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of the products that have their color described as \"red\" and have a characteristic named \"slow\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'red' and characteristics.characteristic_name = 'slow'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products have the color description 'red' and the characteristic name 'slow'? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'red' and characteristics.characteristic_name = 'slow'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the products that have the color description \"white\" or have the characteristic name \"hot\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'white' or characteristics.characteristic_name = 'hot'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products have their color described as 'white' or have a characteristic with the name 'hot'? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'white' or characteristics.characteristic_name = 'hot'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the unit of measuerment of the product category code \"Herbs\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select unit_of_measure from ref_product_categories where product_category_code = 'Herbs'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the unit of measure for 'Herb' products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select unit_of_measure from ref_product_categories where product_category_code = 'Herbs'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the product category description of the product category with code \"Spices\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_description from ref_product_categories where product_category_code = 'Spices'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the product category with the code 'Spices'? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_description from ref_product_categories where product_category_code = 'Spices'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the product category description and unit of measurement of category \"Herbs\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_description , unit_of_measure from ref_product_categories where product_category_code = 'Herbs'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the description and unit of measurement for products in the 'Herbs' category. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select product_category_description , unit_of_measure from ref_product_categories where product_category_code = 'Herbs'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the unit of measurement of product named \"cumin\"? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_product_categories.unit_of_measure from products join ref_product_categories on products.product_category_code = ref_product_categories.product_category_code where products.product_name = 'cumin'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the unit of measure for the product with the name 'cumin'. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_product_categories.unit_of_measure from products join ref_product_categories on products.product_category_code = ref_product_categories.product_category_code where products.product_name = 'cumin'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the unit of measurement and product category code of product named \"chervil\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_product_categories.unit_of_measure , ref_product_categories.product_category_code from products join ref_product_categories on products.product_category_code = ref_product_categories.product_category_code where products.product_name = 'chervil'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the unit of measure and category code for the 'chervil' product? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_product_categories.unit_of_measure , ref_product_categories.product_category_code from products join ref_product_categories on products.product_category_code = ref_product_categories.product_category_code where products.product_name = 'chervil'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the product names that are colored 'white' but do not have unit of measurement \"Handful\". | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name from products join ref_product_categories on products.product_category_code = ref_product_categories.product_category_code join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'white' and ref_product_categories.unit_of_measure != 'Handful'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ where _ | select products.product_name from products join ref_product_categories on products.product_category_code = ref_product_categories.product_category_code join ref_colors on products.color_code = ref_colors.color_code where ref_colors.color_description = 'white' and ref_product_categories.unit_of_measure != 'Handful'" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the color for most products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code group by ref_colors.color_description order by count ( * ) desc limit 1" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the color description that is most common across all products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code group by ref_colors.color_description order by count ( * ) desc limit 1" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the color used by least products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code group by ref_colors.color_description order by count ( * ) asc limit 1" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the color description that is least common across products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select ref_colors.color_description from products join ref_colors on products.color_code = ref_colors.color_code group by ref_colors.color_description order by count ( * ) asc limit 1" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the characteristic name used by most number of the products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id group by characteristics.characteristic_name order by count ( * ) desc limit 1" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the characteristic that is most common across all products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id group by characteristics.characteristic_name order by count ( * ) desc limit 1" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, details and data types of the characteristics which are never used by any product? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select characteristic_name , other_characteristic_details , characteristic_data_type from characteristics except select characteristics.characteristic_name , characteristics.other_characteristic_details , characteristics.characteristic_data_type from characteristics join product_characteristics on characteristics.characteristic_id = product_characteristics.characteristic_id" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names, details, and data types of characteristics that are not found in any product. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select characteristic_name , other_characteristic_details , characteristic_data_type from characteristics except select characteristics.characteristic_name , characteristics.other_characteristic_details , characteristics.characteristic_data_type from characteristics join product_characteristics on characteristics.characteristic_id = product_characteristics.characteristic_id" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are characteristic names used at least twice across all products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id group by characteristics.characteristic_name having count ( * ) >= 2" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names of characteristics that are in two or more products? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select characteristics.characteristic_name from products join product_characteristics on products.product_id = product_characteristics.product_id join characteristics on product_characteristics.characteristic_id = characteristics.characteristic_id group by characteristics.characteristic_name having count ( * ) >= 2" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many colors are never used by any product? | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from ref_colors where color_code not in ( select color_code from products )" }, { "db_id": "products_gen_characteristics", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of colors that are not used in any products. | ref_characteristic_types : characteristic_type_code , characteristic_type_description | ref_colors : color_code , color_description | ref_product_categories : product_category_code , product_category_description , unit_of_measure | characteristics : characteristic_id , characteristic_type_code , characteristic_data_type , characteristic_name , other_characteristic_details | products : product_id , color_code , product_category_code , product_name , typical_buying_price , typical_selling_price , product_description , other_product_details | product_characteristics : product_id , characteristic_id , product_characteristic_value | characteristics.characteristic_type_code = ref_characteristic_types.characteristic_type_code | products.color_code = ref_colors.color_code | products.product_category_code = ref_product_categories.product_category_code | product_characteristics.product_id = products.product_id | product_characteristics.characteristic_id = characteristics.characteristic_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from ref_colors where color_code not in ( select color_code from products )" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many events are there? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from event" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the event names by year from the most recent to the oldest. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from event order by year desc" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the event that happened in the most recent year? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from event order by year desc limit 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many stadiums are there? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from stadium" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the stadium that has the maximum capacity. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from stadium order by capacity desc limit 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of stadiums whose capacity is smaller than the average capacity. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select name from stadium where capacity < ( select avg ( capacity ) from stadium )" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the country that has the most stadiums. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select country from stadium group by country order by count ( * ) desc limit 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which country has at most 3 stadiums listed? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select country from stadium group by country having count ( * ) <= 3" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country from stadium where capacity > 60000 intersect select country from stadium where capacity < 50000" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many cities have a stadium that was opened before the year of 2006? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct city ) from stadium where opening_year < 2006" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many stadiums does each country have? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select country , count ( * ) from stadium group by country" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which countries do not have a stadium that was opened after 2006? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select country from stadium except select country from stadium where opening_year > 2006" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many stadiums are not in country \"Russia\"? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from stadium where country != 'Russia'" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all swimmers, sorted by their 100 meter scores in ascending order. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from swimmer order by meter_100 asc" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different countries are all the swimmers from? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct nationality ) from swimmer" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List countries that have more than one swimmer. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select nationality , count ( * ) from swimmer group by nationality having count ( * ) > 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all 200 meter and 300 meter results of swimmers with nationality \"Australia\". | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ | select meter_200 , meter_300 from swimmer where nationality = 'Australia'" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of swimmers who has a result of \"win\". | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ | select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id where result = 'Win'" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the stadium which held the most events? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select stadium.name from stadium join event on stadium.id = event.stadium_id group by event.stadium_id order by count ( * ) desc limit 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and capacity of the stadium where the event named \"World Junior\" happened. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ | select stadium.name , stadium.capacity from stadium join event on stadium.id = event.stadium_id where event.name = 'World Junior'" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of stadiums which have never had any event. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from stadium where id not in ( select stadium_id from event )" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the swimmer who has the most records. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id group by record.swimmer_id order by count ( * ) desc limit 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the swimmer who has at least 2 records. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id group by record.swimmer_id having count ( * ) >= 2" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and nationality of the swimmer who has won (i.e., has a result of \"win\") more than 1 time. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) > _ | select swimmer.name , swimmer.nationality from swimmer join record on swimmer.id = record.swimmer_id where result = 'Win' group by record.swimmer_id having count ( * ) > 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the swimmers who have no record. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from swimmer where id not in ( select swimmer_id from record )" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the swimmers who have both \"win\" and \"loss\" results in the record. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id where result = 'Win' intersect select swimmer.name from swimmer join record on swimmer.id = record.swimmer_id where result = 'Loss'" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of stadiums that some Australian swimmers have been to. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ where _ | select stadium.name from swimmer join record on swimmer.id = record.swimmer_id join event on record.event_id = event.id join stadium on stadium.id = event.stadium_id where swimmer.nationality = 'Australia'" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of stadiums that the most swimmers have been to. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select stadium.name from record join event on record.event_id = event.id join stadium on stadium.id = event.stadium_id group by event.stadium_id order by count ( * ) desc limit 1" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all details for each swimmer. | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect _ from _ | select * from swimmer" }, { "db_id": "swimming", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average capacity of the stadiums that were opened in year 2005? | swimmer : id , name , nationality , meter_100 , meter_200 , meter_300 , meter_400 , meter_500 , meter_600 , meter_700 , time | stadium : id , name , capacity , city , country , opening_year | event : id , name , stadium_id , year | record : id , result , swimmer_id , event_id | event.stadium_id = stadium.id | record.swimmer_id = swimmer.id | record.event_id = event.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( capacity ) from stadium where opening_year = 2005" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many railways are there? | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect count ( _ ) _ _ | select count ( * ) from railway" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the builders of railways in ascending alphabetical order. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ order by _ asc | select builder from railway order by builder asc" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the wheels and locations of the railways. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ | select wheels , location from railway" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum level of managers in countries that are not \"Australia\"? | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect max ( _ ) _ _ where _ | select max ( level ) from manager where country != 'Australia\t'" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age for all managers? | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect avg ( _ ) _ _ | select avg ( age ) from manager" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of managers in ascending order of level? | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ order by _ asc | select name from manager order by level asc" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and arrival times of trains? | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ | select name , arrival from train" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the oldest manager? | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ order by _ desc limit _ | select name from manager order by age desc limit 1" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of trains and locations of railways they are in. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ | select train.name , railway.location from railway join train on railway.railway_id = train.railway_id" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the builder of railways associated with the trains named \"Andaman Exp\". | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ where _ | select railway.builder from railway join train on railway.railway_id = train.railway_id where train.name = 'Andaman Exp'" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show id and location of railways that are associated with more than one train. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ group by _ having count ( _ ) > _ | select train.railway_id , railway.location from railway join train on railway.railway_id = train.railway_id group by train.railway_id having count ( * ) > 1" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id and builder of the railway that are associated with the most trains. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ group by _ order by count ( _ ) desc limit _ | select train.railway_id , railway.builder from railway join train on railway.railway_id = train.railway_id group by train.railway_id order by count ( * ) desc limit 1" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different builders of railways, along with the corresponding number of railways using each builder. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ , count ( _ ) _ _ group by _ | select builder , count ( * ) from railway group by builder" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common builder of railways. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ group by _ order by count ( _ ) desc limit _ | select builder from railway group by builder order by count ( * ) desc limit 1" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different locations of railways along with the corresponding number of railways at each location. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ , count ( _ ) _ _ group by _ | select location , count ( * ) from railway group by location" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the locations that have more than one railways. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ group by _ having count ( _ ) > _ | select location from railway group by location having count ( * ) > 1" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the object number of railways that do not have any trains. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ where _ not in ( select _ _ _ ) | select objectnumber from railway where railway_id not in ( select railway_id from train )" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the countries that have both managers of age above 50 and managers of age below 46. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ where _ intersect select _ _ _ where _ | select country from manager where age > 50 intersect select country from manager where age < 46" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the distinct countries of managers. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect distinct _ _ _ | select distinct country from manager" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the working years of managers in descending order of their level. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ order by _ desc | select working_year_starts from manager order by level desc" }, { "db_id": "railway", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the countries that have managers of age above 50 or below 46. | railway : railway_id , railway , builder , built , wheels , location , objectnumber | train : train_id , train_num , name , from , arrival , railway_id | manager : manager_id , name , country , working_year_starts , age , level | railway_manage : railway_id , manager_id , from_year | train.railway_id = railway.railway_id | railway_manage.railway_id = railway.railway_id | railway_manage.manager_id = manager.manager_id | \n\n### Response:\n\nselect _ _ _ where _ | select country from manager where age > 50 or age < 46" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many addresses are there in country USA? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from addresses where country = 'USA'" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct cities in the address record. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct city from addresses" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each state and the number of addresses in each state. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select state_province_county , count ( * ) from addresses group by state_province_county" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show names and phones of customers who do not have address information. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select customer_name , customer_phone from customers where customer_id not in ( select customer_id from customer_address_history )" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of the customer who has the most orders. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the product type codes which have at least two products. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select product_type_code from products group by product_type_code having count ( * ) >= 2" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of customers who have both an order in completed status and an order in part status. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'Completed' intersect select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customer_orders.order_status_code = 'Part'" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, phone, and payment method code for all customers in descending order of customer number. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select customer_name , customer_phone , payment_method_code from customers order by customer_number desc" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the product name and total order quantity for each product. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select products.product_name , sum ( order_items.order_quantity ) from products join order_items on products.product_id = order_items.product_id group by products.product_id" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the minimum, maximum, average price for all products. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect min ( _ ) , max ( _ ) , avg ( _ ) from _ | select min ( product_price ) , max ( product_price ) , avg ( product_price ) from products" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many products have a price higher than the average? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ > ( select avg ( _ ) from _ ) | select count ( * ) from products where product_price > ( select avg ( product_price ) from products )" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the customer name, customer address city, date from, and date to for each customer address history. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ | select customers.customer_name , addresses.city , customer_address_history.date_from , customer_address_history.date_to from customer_address_history join customers on customer_address_history.customer_id = customers.customer_id join addresses on customer_address_history.address_id = addresses.address_id" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of customers who use Credit Card payment method and have more than 2 orders. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) > _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id where customers.payment_method_code = 'Credit Card' group by customers.customer_id having count ( * ) > 2" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and phone of the customer with the most ordered product quantity? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select customers.customer_name , customers.customer_phone from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on order_items.order_id = customer_orders.order_id group by customers.customer_id order by sum ( order_items.order_quantity ) desc limit 1" }, { "db_id": "customers_and_products_contacts", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the product type and name for the products with price higher than 1000 or lower than 500. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | products : product_id , product_type_code , product_name , product_price | customers : customer_id , payment_method_code , customer_number , customer_name , customer_address , customer_phone , customer_email | contacts : contact_id , customer_id , gender , first_name , last_name , contact_phone | customer_address_history : customer_id , address_id , date_from , date_to | customer_orders : order_id , customer_id , order_date , order_status_code | order_items : order_item_id , order_id , product_id , order_quantity | customer_address_history.address_id = addresses.address_id | customer_address_history.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select product_type_code , product_name from products where product_price > 1000 or product_price < 500" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of dorms only for female (F gender). | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_name from dorm where gender = 'F'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the all-female dorms? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_name from dorm where gender = 'F'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of dorms that can accommodate more than 300 students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_name from dorm where student_capacity > 300" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the dorms that can accomdate more than 300 students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_name from dorm where student_capacity > 300" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many female students (sex is F) whose age is below 25? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student where sex = 'F' and age < 25" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many girl students who are younger than 25? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student where sex = 'F' and age < 25" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of students who is older than 20. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname from student where age > 20" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students who are older than 20? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname from student where age > 20" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of students living in city PHL whose age is between 20 and 25. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select fname from student where city_code = 'PHL' and age between 20 and 25" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of the students who are in age 20 to 25 and living in PHL city? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select fname from student where city_code = 'PHL' and age between 20 and 25" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many dorms are there? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from dorm" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many dorms are in the database? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from dorm" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct amenities. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from dorm_amenity" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many diffrent dorm amenities are there? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from dorm_amenity" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total capacity of all dorms. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( student_capacity ) from dorm" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total student capacity of all dorms? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( student_capacity ) from dorm" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are there? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students exist? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from student" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of all students living in the each city. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , city_code from student group by city_code" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age for each city and what are those cities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( age ) , city_code from student group by city_code" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average and total capacity of dorms for the students with gender X. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , sum ( _ ) from _ where _ | select avg ( student_capacity ) , sum ( student_capacity ) from dorm where gender = 'X'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and total capacity for all dorms who are of gender X? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , sum ( _ ) from _ where _ | select avg ( student_capacity ) , sum ( student_capacity ) from dorm where gender = 'X'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of dorms that have some amenity. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct dormid ) from has_amenity" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many dorms have amenities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct dormid ) from has_amenity" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of dorms that do not have any amenity | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select dorm_name from dorm where dormid not in ( select dormid from has_amenity )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the dorms that don't have any amenities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select dorm_name from dorm where dormid not in ( select dormid from has_amenity )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct gender for dorms. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct gender ) from dorm" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different genders are there in the dorms? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct gender ) from dorm" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the capacity and gender type of the dorm whose name has substring 'Donor'. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ like _ | select student_capacity , gender from dorm where dorm_name like '%Donor%'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ like _ | select student_capacity , gender from dorm where dorm_name like '%Donor%'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_name , gender from dorm where student_capacity > 300 or student_capacity < 100" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and types of the dorms that have a capacity greater than 300 or less than 100? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_name , gender from dorm where student_capacity > 300 or student_capacity < 100" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the numbers of different majors and cities. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) , count ( distinct _ ) from _ | select count ( distinct major ) , count ( distinct city_code ) from student" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different majors are there and how many different city codes are there for each student? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) , count ( distinct _ ) from _ | select count ( distinct major ) , count ( distinct city_code ) from student" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of dorms which have both TV Lounge and Study Room as amenities. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' intersect select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'Study Room'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the dorm with both a TV Lounge and Study Room listed as amenities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' intersect select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'Study Room'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of dorms which have TV Lounge but no Study Room as amenity. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' except select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'Study Room'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of each dorm that has a TV Lounge but no study rooms? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' except select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'Study Room'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select lname from student where sex = 'F' and city_code = 'BAL' union select lname from student where sex = 'M' and age < 20" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of every student who is either female or living in a city with the code BAL or male and under 20? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select lname from student where sex = 'F' and city_code = 'BAL' union select lname from student where sex = 'M' and age < 20" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the dorm with the largest capacity. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select dorm_name from dorm order by student_capacity desc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the dorm with the largest capacity? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select dorm_name from dorm order by student_capacity desc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List in alphabetic order all different amenities. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select amenity_name from dorm_amenity order by amenity_name asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different dorm amenity names in alphabetical order? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select amenity_name from dorm_amenity order by amenity_name asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the code of city where most of students are living in. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select city_code from student group by city_code order by count ( * ) desc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the code of the city with the most students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select city_code from student group by city_code order by count ( * ) desc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of students whose age is younger than the average age. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select fname , lname from student where age < ( select avg ( age ) from student )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of all students who are younger than average? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ < ( select avg ( _ ) from _ ) | select fname , lname from student where age < ( select avg ( age ) from student )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select fname , lname from student where city_code != 'HKG' order by age asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all students who are not living in the city HKG and order the results by age? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select fname , lname from student where city_code != 'HKG' order by age asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select dorm_amenity.amenity_name from dorm_amenity join has_amenity on has_amenity.amenid = dorm_amenity.amenid join dorm on has_amenity.dormid = dorm.dormid where dorm.dorm_name = 'Anonymous Donor Hall' order by dorm_amenity.amenity_name asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the amenities in alphabetical order that Anonymous Donor Hall has? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select dorm_amenity.amenity_name from dorm_amenity join has_amenity on has_amenity.amenid = dorm_amenity.amenid join dorm on has_amenity.dormid = dorm.dormid where dorm.dorm_name = 'Anonymous Donor Hall' order by dorm_amenity.amenity_name asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of dorms and total capacity for each gender. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , sum ( _ ) , _ from _ group by _ | select count ( * ) , sum ( student_capacity ) , gender from dorm group by gender" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many dorms are there and what is the total capacity for each gender? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , sum ( _ ) , _ from _ group by _ | select count ( * ) , sum ( student_capacity ) , gender from dorm group by gender" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average and oldest age for students with different sex. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , _ from _ group by _ | select avg ( age ) , max ( age ) , sex from student group by sex" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and oldest age for each gender of student? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , _ from _ group by _ | select avg ( age ) , max ( age ) , sex from student group by sex" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students in each major. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , major from student group by major" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are there in each major? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , major from student group by major" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number and average age of students living in each city. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , avg ( _ ) , _ from _ group by _ | select count ( * ) , avg ( age ) , city_code from student group by city_code" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students live in each city and what are their average ages? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , avg ( _ ) , _ from _ group by _ | select count ( * ) , avg ( age ) , city_code from student group by city_code" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age and number of male students (with sex M) from each city. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , avg ( _ ) , _ from _ where _ group by _ | select count ( * ) , avg ( age ) , city_code from student where sex = 'M' group by city_code" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age and how many male students are there in each city? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , avg ( _ ) , _ from _ where _ group by _ | select count ( * ) , avg ( age ) , city_code from student where sex = 'M' group by city_code" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students for the cities where have more than one student. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ having count ( _ ) > _ | select count ( * ) , city_code from student group by city_code having count ( * ) > 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are from each city, and which cities have more than one cities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ having count ( _ ) > _ | select count ( * ) , city_code from student group by city_code having count ( * ) > 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of students who are not in the largest major. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ != ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select fname , lname from student where major != ( select major from student group by major order by count ( * ) desc limit 1 )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the students who are not in the largest major? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ != ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select fname , lname from student where major != ( select major from student group by major order by count ( * ) desc limit 1 )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students whose age is older than the average age for each gender. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ > ( select avg ( _ ) from _ ) group by _ | select count ( * ) , sex from student where age > ( select avg ( age ) from student ) group by sex" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are older than average for each gender? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ > ( select avg ( _ ) from _ ) group by _ | select count ( * ) , sex from student where age > ( select avg ( age ) from student ) group by sex" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of students living in each dorm and the name of dorm. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( student.age ) , dorm.dorm_name from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid group by dorm.dorm_name" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age for each dorm and what are the names of each dorm? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( student.age ) , dorm.dorm_name from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid group by dorm.dorm_name" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of amenities for each of the dorms that can accommodate more than 100 students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dorm.dormid from dorm join has_amenity on dorm.dormid = has_amenity.dormid where dorm.student_capacity > 100 group by dorm.dormid" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each dorm, how many amenities does it have? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dorm.dormid from dorm join has_amenity on dorm.dormid = has_amenity.dormid where dorm.student_capacity > 100 group by dorm.dormid" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of students who is older than 20 in each dorm. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dorm.dorm_name from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where student.age > 20 group by dorm.dorm_name" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are older than 20 in each dorm? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , dorm.dorm_name from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where student.age > 20 group by dorm.dorm_name" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of students who are living in the Smith Hall. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.dorm_name = 'Smith Hall'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students in Smith Hall? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.dorm_name = 'Smith Hall'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average age of students who are living in the dorm with the largest capacity. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ = ( select max ( _ ) from _ ) | select avg ( student.age ) from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.student_capacity = ( select max ( student_capacity ) from dorm )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age of students who are living in the dorm with the largest capacity? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect avg ( _ ) from _ where _ = ( select max ( _ ) from _ ) | select avg ( student.age ) from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.student_capacity = ( select max ( student_capacity ) from dorm )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of students living in the male dorm (with gender M). | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.gender = 'M'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the total number of students who are living in a male dorm? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.gender = 'M'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of female students (with F sex) living in Smith Hall | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.dorm_name = 'Smith Hall' and student.sex = 'F'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many female students live in Smith Hall? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from student join lives_in on student.stuid = lives_in.stuid join dorm on dorm.dormid = lives_in.dormid where dorm.dorm_name = 'Smith Hall' and student.sex = 'F'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of amenities Smith Hall dorm have. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm.dorm_name = 'Smith Hall'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the amenities that Smith Hall has? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm.dorm_name = 'Smith Hall'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of amenities Smith Hall dorm have. ordered the results by amenity names. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm.dorm_name = 'Smith Hall' order by dorm_amenity.amenity_name asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What amenities does Smith Hall have in alphabetical order? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm.dorm_name = 'Smith Hall' order by dorm_amenity.amenity_name asc" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of amenity that is most common in all dorms. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dorm_amenity.amenity_name from dorm_amenity join has_amenity on dorm_amenity.amenid = has_amenity.amenid group by has_amenity.amenid order by count ( * ) desc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common amenity in the dorms? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select dorm_amenity.amenity_name from dorm_amenity join has_amenity on dorm_amenity.amenid = has_amenity.amenid group by has_amenity.amenid order by count ( * ) desc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name of students who are living in the dorm that has most number of amenities. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select student.fname from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid in ( select lives_in.dormid from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid group by dorm.dormid order by count ( * ) desc limit 1 )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of all students who live in the dorm with the most amenities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select student.fname from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid in ( select lives_in.dormid from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid group by dorm.dormid order by count ( * ) desc limit 1 )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and capacity of the dorm with least number of amenities. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select dorm.dorm_name , dorm.student_capacity from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid group by has_amenity.dormid order by count ( * ) asc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and capacity of the dorm with the fewest amount of amenities? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select dorm.dorm_name , dorm.student_capacity from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid group by has_amenity.dormid order by count ( * ) asc limit 1" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of dorms that do not have amenity TV Lounge. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select dorm_name from dorm except select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the dorm that does not have a TV Lounge? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select dorm_name from dorm except select dorm.dorm_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of students who are living in the dorms that have amenity TV Lounge. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select student.fname , student.lname from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all students who are living in a dorm with a TV Lounge? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) | select student.fname , student.lname from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select student.fname , student.age from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid not in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name and age of every student who lives in a dorm with a TV Lounge? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select student.fname , student.age from student join lives_in on student.stuid = lives_in.stuid where lives_in.dormid not in ( select has_amenity.dormid from has_amenity join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid where dorm_amenity.amenity_name = 'TV Lounge' )" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of amenities of the dorm where the student with last name Smith is living in. | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid join lives_in on lives_in.dormid = dorm.dormid join student on student.stuid = lives_in.stuid where student.lname = 'Smith'" }, { "db_id": "dorm_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the amenities in the dorm that a student who has the last name of Smith lives in? | student : stuid , lname , fname , age , sex , major , advisor , city_code | dorm : dormid , dorm_name , student_capacity , gender | dorm_amenity : amenid , amenity_name | has_amenity : dormid , amenid | lives_in : stuid , dormid , room_number | has_amenity.amenid = dorm_amenity.amenid | has_amenity.dormid = dorm.dormid | lives_in.dormid = dorm.dormid | lives_in.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select dorm_amenity.amenity_name from dorm join has_amenity on dorm.dormid = has_amenity.dormid join dorm_amenity on has_amenity.amenid = dorm_amenity.amenid join lives_in on lives_in.dormid = dorm.dormid join student on student.stuid = lives_in.stuid where student.lname = 'Smith'" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are there? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the emails and phone numbers of all the customers, ordered by email address and phone number. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select email_address , phone_number from customers order by email_address asc , phone_number" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the emails and phone numbers of all customers, sorted by email address and phone number? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select email_address , phone_number from customers order by email_address asc , phone_number" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city has the least number of customers whose type code is \"Good Credit Rating\"? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) asc limit _ | select town_city from customers where customer_type_code = 'Good Credit Rating' group by town_city order by count ( * ) asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the city with the customer type code \"Good Credit Rating\" that had the fewest customers. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) asc limit _ | select town_city from customers where customer_type_code = 'Good Credit Rating' group by town_city order by count ( * ) asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all products along with the number of complaints that they have received. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from products join complaints on products.product_id = complaints.product_id group by products.product_name" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the different product names, and how many complains has each received? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from products join complaints on products.product_id = complaints.product_id group by products.product_name" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the emails of customers who has filed a complaints of the product with the most complaints. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customers.email_address from customers join complaints on customers.customer_id = complaints.customer_id group by customers.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customers.email_address from customers join complaints on customers.customer_id = complaints.customer_id group by customers.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which products has been complained by the customer who has filed least amount of complaints? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ group by _ order by count ( _ ) asc limit _ | select distinct products.product_name from products join complaints on products.product_id = complaints.product_id join customers group by customers.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names of products that have had complaints filed by the customer who has filed the fewest complaints. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect distinct _ from _ group by _ order by count ( _ ) asc limit _ | select distinct products.product_name from products join complaints on products.product_id = complaints.product_id join customers group by customers.customer_id order by count ( * ) asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the phone number of the customer who has filed the most recent complaint? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select customers.phone_number from customers join complaints on customers.customer_id = complaints.customer_id order by complaints.date_complaint_raised desc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the phone number of the customer who filed the complaint that was raised most recently. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select customers.phone_number from customers join complaints on customers.customer_id = complaints.customer_id order by complaints.date_complaint_raised desc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the email and phone number of the customers who have never filed a complaint before. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select email_address , phone_number from customers where customer_id not in ( select customer_id from complaints )" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the emails and phone numbers of custoemrs who have never filed a complaint? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select email_address , phone_number from customers where customer_id not in ( select customer_id from complaints )" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the phone number of all the customers and staff. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select phone_number from customers union select phone_number from staff" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phone numbers of all customers and all staff members? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select phone_number from customers union select phone_number from staff" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description of the product named \"Chocolate\"? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select product_description from products where product_name = 'Chocolate'" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the description of the product called \"Chocolate\". | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select product_description from products where product_name = 'Chocolate'" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and category of the most expensive product. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_name , product_category_code from products order by product_price desc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and category code of the product with the highest price? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select product_name , product_category_code from products order by product_price desc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the prices of products which has never received a single complaint. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select product_price from products where product_id not in ( select product_id from complaints )" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the prices of products that have never gotten a complaint? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select product_price from products where product_id not in ( select product_id from complaints )" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price of the products for each category? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( product_price ) , product_category_code from products group by product_category_code" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average price of products that have each category code. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( product_price ) , product_category_code from products group by product_category_code" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of the staff member who processed the complaint of the cheapest product. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select staff.last_name from staff join complaints on staff.staff_id = complaints.staff_id join products on complaints.product_id = products.product_id order by products.product_price asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the staff member in charge of the complaint on the product with the lowest price? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select staff.last_name from staff join complaints on staff.staff_id = complaints.staff_id join products on complaints.product_id = products.product_id order by products.product_price asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which complaint status has more than 3 records on file? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select complaint_status_code from complaints group by complaint_status_code having count ( * ) > 3" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return complaint status codes have more than 3 corresponding complaints? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select complaint_status_code from complaints group by complaint_status_code having count ( * ) > 3" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of the staff whose email address contains \"wrau\". | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select last_name from staff where email_address like '%wrau%'" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of staff with email addressed containing the substring \"wrau\"? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select last_name from staff where email_address like '%wrau%'" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are there in the customer type with the most customers? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select count ( * ) from customers group by customer_type_code order by count ( * ) desc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of customers that have the customer type that is most common. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select count ( * ) from customers group by customer_type_code order by count ( * ) desc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the staff who has handled the first ever complaint? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select staff.last_name from staff join complaints on staff.staff_id = complaints.staff_id order by complaints.date_complaint_raised asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the last name of the staff member who handled the complaint with the earliest date raised. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select staff.last_name from staff join complaints on staff.staff_id = complaints.staff_id order by complaints.date_complaint_raised asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct complaint type codes are there in the database? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct complaint_type_code ) from complaints" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different complaint type codes. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct complaint_type_code ) from complaints" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the address line 1 and 2 of the customer with email \"vbogisich@example.org\". | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address_line_1 , address_line_2 from customers where email_address = 'vbogisich@example.org'" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ where _ | select address_line_1 , address_line_2 from customers where email_address = 'vbogisich@example.org'" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of complaints with Product Failure type for each complaint status. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select complaint_status_code , count ( * ) from complaints where complaint_type_code = 'Product Failure' group by complaint_status_code" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Of complaints with the type code \"Product Failure\", how many had each different status code? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select complaint_status_code , count ( * ) from complaints where complaint_type_code = 'Product Failure' group by complaint_status_code" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is first names of the top 5 staff who have handled the greatest number of complaints? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select staff.first_name from staff join complaints on staff.staff_id = complaints.staff_id group by complaints.staff_id order by count ( * ) asc limit 5" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the first names of the 5 staff members who have handled the most complaints. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select staff.first_name from staff join complaints on staff.staff_id = complaints.staff_id group by complaints.staff_id order by count ( * ) asc limit 5" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which state has the most customers? | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select state from customers group by state order by count ( * ) asc limit 1" }, { "db_id": "customer_complaints", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the state that has the most customers. | staff : staff_id , gender , first_name , last_name , email_address , phone_number | customers : customer_id , customer_type_code , address_line_1 , address_line_2 , town_city , state , email_address , phone_number | products : product_id , parent_product_id , product_category_code , date_product_first_available , date_product_discontinued , product_name , product_description , product_price | complaints : complaint_id , product_id , customer_id , complaint_outcome_code , complaint_status_code , complaint_type_code , date_complaint_raised , date_complaint_closed , staff_id | complaints.customer_id = customers.customer_id | complaints.product_id = products.product_id | complaints.staff_id = staff.staff_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select state from customers group by state order by count ( * ) asc limit 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many submissions are there? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from submission" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from submission" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the authors of submissions in ascending order of scores. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select author from submission order by scores asc" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the author for each submission and list them in ascending order of submission score. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select author from submission order by scores asc" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the authors of submissions and their colleges? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ | select author , college from submission" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each submission, show the author and their affiliated college. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ | select author , college from submission" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of authors from college \"Florida\" or \"Temple\" | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ where _ | select author from submission where college = 'Florida' or college = 'Temple'" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which authors with submissions are from college \"Florida\" or \"Temple\"? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ where _ | select author from submission where college = 'Florida' or college = 'Temple'" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average score of submissions? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( scores ) from submission" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average score of submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( scores ) from submission" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the author of the submission with the highest score? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select author from submission order by scores desc limit 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the author who achieved the highest score in a submission. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select author from submission order by scores desc limit 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different colleges along with the number of authors of submission from each college. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select college , count ( * ) from submission group by college" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each college, return the college name and the count of authors with submissions from that college. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select college , count ( * ) from submission group by college" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the most common college of authors of submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select college from submission group by college order by count ( * ) desc limit 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which college has the most authors with submissions? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select college from submission group by college order by count ( * ) desc limit 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select college from submission where scores > 90 intersect select college from submission where scores < 80" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which colleges have both authors with submission score above 90 and authors with submission score below 80? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select college from submission where scores > 90 intersect select college from submission where scores < 80" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the authors of submissions and the acceptance results of their submissions. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ | select submission.author , acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each submission, find its author and acceptance result. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ | select submission.author , acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the result of the submission with the highest score. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id order by submission.scores desc limit 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which submission received the highest score in acceptance result. Show me the result. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select acceptance.result from acceptance join submission on acceptance.submission_id = submission.submission_id order by submission.scores desc limit 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show each author and the number of workshops they submitted to. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select submission.author , count ( distinct acceptance.workshop_id ) from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many workshops did each author submit to? Return the author name and the number of workshops. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ , count ( distinct _ ) from _ group by _ | select submission.author , count ( distinct acceptance.workshop_id ) from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the authors who have submissions to more than one workshop. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( distinct _ ) > _ | select submission.author from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author having count ( distinct acceptance.workshop_id ) > 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which authors have submitted to more than one workshop? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( distinct _ ) > _ | select submission.author from acceptance join submission on acceptance.submission_id = submission.submission_id group by submission.author having count ( distinct acceptance.workshop_id ) > 1" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the date and venue of each workshop in ascending alphabetical order of the venue. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select date , venue from workshop order by venue asc" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select date , venue from workshop order by venue asc" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the authors who do not have submission to any workshop. | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select author from submission where submission_id not in ( select submission_id from acceptance )" }, { "db_id": "workshop_paper", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which authors did not submit to any workshop? | workshop : workshop_id , date , venue , name | submission : submission_id , scores , author , college | acceptance : submission_id , workshop_id , result | acceptance.workshop_id = workshop.workshop_id | acceptance.submission_id = submission.submission_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select author from submission where submission_id not in ( select submission_id from acceptance )" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of investors in total. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from investors" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all investor details. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ | select investor_details from investors" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct lot details. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct lot_details from lots" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the maximum amount of transaction. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( amount_of_transaction ) from transactions" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all date and share count of transactions. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ | select date_of_transaction , share_count from transactions" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total share of transactions? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( share_count ) from transactions" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all transaction ids with transaction code 'PUR'. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select transaction_id from transactions where transaction_type_code = 'PUR'" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all dates of transactions whose type code is \"SALE\". | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_transaction from transactions where transaction_type_code = 'SALE'" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average amount of transactions with type code \"SALE\". | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( amount_of_transaction ) from transactions where transaction_type_code = 'SALE'" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the description of transaction type with code \"PUR\". | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select transaction_type_description from ref_transaction_types where transaction_type_code = 'PUR'" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect min ( _ ) from _ where _ | select min ( amount_of_transaction ) from transactions where transaction_type_code = 'PUR' and share_count > 50" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the maximum share count of transactions where the amount is smaller than 10000 | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( share_count ) from transactions where amount_of_transaction < 10000" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_transaction from transactions where share_count > 100 or amount_of_transaction > 1000" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the transaction type descriptions and dates if the share count is smaller than 10. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_transaction_types.transaction_type_description , transactions.date_of_transaction from ref_transaction_types join transactions on ref_transaction_types.transaction_type_code = transactions.transaction_type_code where transactions.share_count < 10" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show details of all investors if they make any transaction with share count greater than 100. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id where transactions.share_count > 100" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct transaction types are used in the transactions? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct transaction_type_code ) from transactions" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the lot details and investor ids. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ | select lot_details , investor_id from lots" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the lot details of lots that belong to investors with details \"l\"? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select lots.lot_details from investors join lots on investors.investor_id = lots.investor_id where investors.investor_details = 'l'" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the purchase details of transactions with amount bigger than 10000? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select purchases.purchase_details from purchases join transactions on purchases.purchase_transaction_id = transactions.transaction_id where transactions.amount_of_transaction > 10000" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the sale details and dates of transactions with amount smaller than 3000? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select sales.sales_details , transactions.date_of_transaction from sales join transactions on sales.sales_transaction_id = transactions.transaction_id where transactions.amount_of_transaction < 3000" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the lot details of lots associated with transactions with share count smaller than 50? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.transaction_id join transactions on transactions_lots.transaction_id = transactions.transaction_id where transactions.share_count < 50" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.transaction_id join transactions on transactions_lots.transaction_id = transactions.transaction_id where transactions.share_count > 100 and transactions.transaction_type_code = 'PUR'" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average transaction amount for different transaction types. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select transaction_type_code , avg ( amount_of_transaction ) from transactions group by transaction_type_code" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the maximum and minimum share count of different transaction types. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , max ( _ ) , min ( _ ) from _ group by _ | select transaction_type_code , max ( share_count ) , min ( share_count ) from transactions group by transaction_type_code" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average share count of transactions for different investors. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select investor_id , avg ( share_count ) from transactions group by investor_id" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average share count of transactions each each investor, ordered by average share count. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) asc | select investor_id , avg ( share_count ) from transactions group by investor_id order by avg ( share_count ) asc" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average amount of transactions for different investors. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select investor_id , avg ( amount_of_transaction ) from transactions group by investor_id" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average amount of transactions for different lots. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select transactions_lots.lot_id , avg ( amount_of_transaction ) from transactions join transactions_lots on transactions.transaction_id = transactions_lots.transaction_id group by transactions_lots.lot_id" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average amount of transactions for different lots, ordered by average amount of transactions. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ order by avg ( _ ) asc | select transactions_lots.lot_id , avg ( amount_of_transaction ) from transactions join transactions_lots on transactions.transaction_id = transactions_lots.transaction_id group by transactions_lots.lot_id order by avg ( amount_of_transaction ) asc" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of transactions with transaction type code \"SALE\" for different investors if it is larger than 0. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select investor_id , count ( * ) from transactions where transaction_type_code = 'SALE' group by investor_id" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of transactions for different investors. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select investor_id , count ( * ) from transactions group by investor_id" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the transaction type code that occurs the fewest times. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select transaction_type_code from transactions group by transaction_type_code order by count ( * ) asc limit 1" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the transaction type code that occurs the most frequently. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select transaction_type_code from transactions group by transaction_type_code order by count ( * ) desc limit 1" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the description of the transaction type that occurs most frequently. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ref_transaction_types.transaction_type_description from ref_transaction_types join transactions on ref_transaction_types.transaction_type_code = transactions.transaction_type_code group by ref_transaction_types.transaction_type_code order by count ( * ) desc limit 1" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id and details of the investor that has the largest number of transactions. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select transactions.investor_id , investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id group by transactions.investor_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id and details for the investors who have the top 3 number of transactions. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select transactions.investor_id , investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id group by transactions.investor_id order by count ( * ) desc limit 3" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of the investors who have at least two transactions. | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select transactions.investor_id from investors join transactions on investors.investor_id = transactions.investor_id group by transactions.investor_id having count ( * ) >= 2" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids and details of the investors who have at least two transactions with type code \"SALE\". | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select transactions.investor_id , investors.investor_details from investors join transactions on investors.investor_id = transactions.investor_id where transactions.transaction_type_code = 'SALE' group by transactions.investor_id having count ( * ) >= 2" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of transactions with at least 100 share count or amount bigger than 100? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_transaction from transactions where share_count >= 100 or amount_of_transaction >= 100" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of all sales and purchases? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select sales_details from sales union select purchase_details from purchases" }, { "db_id": "tracking_share_transactions", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of the lots which are not used in any transactions? | investors : investor_id , investor_details | lots : lot_id , investor_id , lot_details | ref_transaction_types : transaction_type_code , transaction_type_description | transactions : transaction_id , investor_id , transaction_type_code , date_of_transaction , amount_of_transaction , share_count , other_details | sales : sales_transaction_id , sales_details | purchases : purchase_transaction_id , purchase_details | transactions_lots : transaction_id , lot_id | lots.investor_id = investors.investor_id | transactions.transaction_type_code = ref_transaction_types.transaction_type_code | transactions.investor_id = investors.investor_id | sales.sales_transaction_id = transactions.transaction_id | purchases.purchase_transaction_id = transactions.transaction_id | transactions_lots.transaction_id = transactions.transaction_id | transactions_lots.lot_id = lots.lot_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select lot_details from lots except select lots.lot_details from lots join transactions_lots on lots.lot_id = transactions_lots.lot_id" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many available hotels are there in total? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from hotels" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of available hotels. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from hotels" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the price ranges of hotels? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select price_range from hotels" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the price ranges for all the hotels. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select price_range from hotels" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct location names. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location_name from locations" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct location names? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location_name from locations" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and details of all the staff members. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select name , other_details from staff" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and detail of each staff member? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select name , other_details from staff" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show details of all visitors. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select tourist_details from visitors" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the detail of each visitor? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select tourist_details from visitors" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the price ranges of hotels with 5 star ratings. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select price_range from hotels where star_rating_code = '5'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the price ranges of five star hotels? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select price_range from hotels where star_rating_code = '5'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average price range of hotels that have 5 star ratings and allow pets. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price_range ) from hotels where star_rating_code = '5' and pets_allowed_yn = 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price range of five star hotels that allow pets? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price_range ) from hotels where star_rating_code = '5' and pets_allowed_yn = 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the address of the location \"UK Gallery\"? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select address from locations where location_name = 'UK Gallery'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the address of the location named \"UK Gallery\". | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select address from locations where location_name = 'UK Gallery'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the detail of the location UK Gallery? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select other_details from locations where location_name = 'UK Gallery'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the detail of the location named \"UK Gallery\". | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select other_details from locations where location_name = 'UK Gallery'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which location names contain the word \"film\"? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select location_name from locations where location_name like '%film%'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the locations whose names contain the word \"film\". | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select location_name from locations where location_name like '%film%'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct names are associated with all the photos? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct name ) from photos" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct names associated with the photos. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct name ) from photos" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct visit dates? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct visit_date from visits" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the distinct visit dates. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct visit_date from visits" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the tourist attractions that can be accessed by bus? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select name from tourist_attractions where how_to_get_there = 'bus'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which tourist attractions can we get to by bus? Tell me the names of the attractions. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select name from tourist_attractions where how_to_get_there = 'bus'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and opening hours of the tourist attractions that can be accessed by bus or walk? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select name , opening_hours from tourist_attractions where how_to_get_there = 'bus' or how_to_get_there = 'walk'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and opening hours of the tourist attractions that we get to by bus or walk. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select name , opening_hours from tourist_attractions where how_to_get_there = 'bus' or how_to_get_there = 'walk'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the star rating descriptions of the hotels with price above 10000? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_hotel_star_ratings.star_rating_description from hotels join ref_hotel_star_ratings on hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code where hotels.price_range > 10000" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the star rating descriptions of the hotels that cost more than 10000. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select ref_hotel_star_ratings.star_rating_description from hotels join ref_hotel_star_ratings on hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code where hotels.price_range > 10000" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details and opening hours of the museums? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select museums.museum_details , tourist_attractions.opening_hours from museums join tourist_attractions on museums.museum_id = tourist_attractions.tourist_attraction_id" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the detail and opening hour for each museum. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select museums.museum_details , tourist_attractions.opening_hours from museums join tourist_attractions on museums.museum_id = tourist_attractions.tourist_attraction_id" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the tourist attraction that is associated with the photo \"game1\"? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from photos join tourist_attractions on photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id where photos.name = 'game1'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which tourist attraction is associated with the photo \"game1\"? Return its name. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from photos join tourist_attractions on photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id where photos.name = 'game1'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and descriptions of the photos taken at the tourist attraction \"film festival\"? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select photos.name , photos.description from photos join tourist_attractions on photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id where tourist_attractions.name = 'film festival'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names and descriptions of the photos taken at the tourist attraction called \"film festival\". | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select photos.name , photos.description from photos join tourist_attractions on photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id where tourist_attractions.name = 'film festival'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details and ways to get to tourist attractions related to royal family? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select royal_family.royal_family_details , tourist_attractions.how_to_get_there from royal_family join tourist_attractions on royal_family.royal_family_id = tourist_attractions.tourist_attraction_id" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which tourist attractions are related to royal family? Tell me their details and how we can get there. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ | select royal_family.royal_family_details , tourist_attractions.how_to_get_there from royal_family join tourist_attractions on royal_family.royal_family_id = tourist_attractions.tourist_attraction_id" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of the shops that can be accessed by walk? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select shops.shop_details from shops join tourist_attractions on shops.shop_id = tourist_attractions.tourist_attraction_id where tourist_attractions.how_to_get_there = 'walk'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the details of the shops that can be reached by walk. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select shops.shop_details from shops join tourist_attractions on shops.shop_id = tourist_attractions.tourist_attraction_id where tourist_attractions.how_to_get_there = 'walk'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the staff that is in charge of the attraction named \"US museum\"? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select staff.name from staff join tourist_attractions on staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id where tourist_attractions.name = 'US museum'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the name of the staff in charge of the attraction called \"US museum\". | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select staff.name from staff join tourist_attractions on staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id where tourist_attractions.name = 'US museum'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of the markets that can be accessed by walk or bus? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select street_markets.market_details from street_markets join tourist_attractions on street_markets.market_id = tourist_attractions.tourist_attraction_id where tourist_attractions.how_to_get_there = 'walk' or tourist_attractions.how_to_get_there = 'bus'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the details of all the markets that are accessible by walk or bus. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select street_markets.market_details from street_markets join tourist_attractions on street_markets.market_id = tourist_attractions.tourist_attraction_id where tourist_attractions.how_to_get_there = 'walk' or tourist_attractions.how_to_get_there = 'bus'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the visit date and details of the visitor whose detail is 'Vincent'? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select visits.visit_date , visits.visit_details from visitors join visits on visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Vincent'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the visit date and details of the tourist whose detail is 'Vincent' | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select visits.visit_date , visits.visit_details from visitors join visits on visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Vincent'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which tourist attractions does the visitor with detail 'Vincent' visit? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id join visitors on visits.tourist_id = visitors.tourist_id where visitors.tourist_details = 'Vincent'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the tourist attractions visited by the tourist whose detail is 'Vincent'. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id join visitors on visits.tourist_id = visitors.tourist_id where visitors.tourist_details = 'Vincent'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name , visits.visit_date from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Vincent' or visitors.tourist_details = 'Vivian'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name , visits.visit_date from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Vincent' or visitors.tourist_details = 'Vivian'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average price of hotels for each star rating code. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select star_rating_code , avg ( price_range ) from hotels group by star_rating_code" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price range of hotels for each each star rating code? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select star_rating_code , avg ( price_range ) from hotels group by star_rating_code" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average price of hotels for different pet policy. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select pets_allowed_yn , avg ( price_range ) from hotels group by pets_allowed_yn" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average prices of hotels grouped by their pet policy. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select pets_allowed_yn , avg ( price_range ) from hotels group by pets_allowed_yn" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the id and star rating of each hotel, ordered by its price from low to high. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select hotel_id , star_rating_code from hotels order by price_range asc" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id and star rating of each hotel and sort them in increasing order of price. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select hotel_id , star_rating_code from hotels order by price_range asc" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the details of the top 3 most expensive hotels. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select other_hotel_details from hotels order by price_range desc limit 3" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of the three most expensive hotels? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select other_hotel_details from hotels order by price_range desc limit 3" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the details and star ratings of the 3 least expensive hotels. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select other_hotel_details , star_rating_code from hotels order by price_range asc limit 3" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details and star ratings of the three hotels with the lowest price ranges? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select other_hotel_details , star_rating_code from hotels order by price_range asc limit 3" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the transportation method most people choose to get to tourist attractions. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select how_to_get_there from tourist_attractions group by how_to_get_there order by count ( * ) desc limit 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which transportation method is used the most often to get to tourist attractions? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select how_to_get_there from tourist_attractions group by how_to_get_there order by count ( * ) desc limit 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the description and code of the attraction type most tourist attractions belong to. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ref_attraction_types.attraction_type_description , tourist_attractions.attraction_type_code from ref_attraction_types join tourist_attractions on ref_attraction_types.attraction_type_code = tourist_attractions.attraction_type_code group by tourist_attractions.attraction_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select ref_attraction_types.attraction_type_description , tourist_attractions.attraction_type_code from ref_attraction_types join tourist_attractions on ref_attraction_types.attraction_type_code = tourist_attractions.attraction_type_code group by tourist_attractions.attraction_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select how_to_get_there , count ( * ) from tourist_attractions group by how_to_get_there" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the possible ways to get to attractions, together with the number of attractions accessible by these methods. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select how_to_get_there , count ( * ) from tourist_attractions group by how_to_get_there" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show different tourist attractions' names, ids, and the corresponding number of visits. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select tourist_attractions.name , visits.tourist_attraction_id , count ( * ) from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id group by visits.tourist_attraction_id" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name, id and the corresponding number of visits for each tourist attraction? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select tourist_attractions.name , visits.tourist_attraction_id , count ( * ) from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id group by visits.tourist_attraction_id" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and ids of tourist attractions that are visited at least two times. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select tourist_attractions.name , visits.tourist_attraction_id from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id group by visits.tourist_attraction_id having count ( * ) >= 2" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which tourist attractions are visited at least twice? Give me their names and ids. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select tourist_attractions.name , visits.tourist_attraction_id from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id group by visits.tourist_attraction_id having count ( * ) >= 2" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and ids of tourist attractions that are visited at most once. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select tourist_attractions.name , tourist_attractions.tourist_attraction_id from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id group by visits.tourist_attraction_id having count ( * ) <= 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of the tourist attractions that are visited at most once? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select tourist_attractions.name , tourist_attractions.tourist_attraction_id from tourist_attractions join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id group by visits.tourist_attraction_id having count ( * ) <= 1" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from locations join tourist_attractions on locations.location_id = tourist_attractions.location_id where locations.address = '660 Shea Crescent' or tourist_attractions.how_to_get_there = 'walk'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from locations join tourist_attractions on locations.location_id = tourist_attractions.location_id where locations.address = '660 Shea Crescent' or tourist_attractions.how_to_get_there = 'walk'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the tourist attractions that have parking or shopping as their feature details? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select tourist_attractions.name from tourist_attractions join tourist_attraction_features on tourist_attractions.tourist_attraction_id = tourist_attraction_features.tourist_attraction_id join features on tourist_attraction_features.feature_id = features.feature_id where features.feature_details = 'park' union select tourist_attractions.name from tourist_attractions join tourist_attraction_features on tourist_attractions.tourist_attraction_id = tourist_attraction_features.tourist_attraction_id join features on tourist_attraction_features.feature_id = features.feature_id where features.feature_details = 'shopping'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select tourist_attractions.name from tourist_attractions join tourist_attraction_features on tourist_attractions.tourist_attraction_id = tourist_attraction_features.tourist_attraction_id join features on tourist_attraction_features.feature_id = features.feature_id where features.feature_details = 'park' union select tourist_attractions.name from tourist_attractions join tourist_attraction_features on tourist_attractions.tourist_attraction_id = tourist_attraction_features.tourist_attraction_id join features on tourist_attraction_features.feature_id = features.feature_id where features.feature_details = 'shopping'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from locations join tourist_attractions on locations.location_id = tourist_attractions.location_id where locations.address = '254 Ottilie Junction' or tourist_attractions.how_to_get_there = 'bus'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ | select tourist_attractions.name from locations join tourist_attractions on locations.location_id = tourist_attractions.location_id where locations.address = '254 Ottilie Junction' or tourist_attractions.how_to_get_there = 'bus'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the tourist attractions Vincent and Marcelle visit? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Vincent' intersect select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Marcelle'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Vincent' intersect select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Marcelle'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of tourist attraction that Alison visited but Rosalind did not visit? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Alison' except select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Rosalind'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Alison' except select tourist_attractions.name from tourist_attractions join visitors join visits on tourist_attractions.tourist_attraction_id = visits.tourist_attraction_id and visitors.tourist_id = visits.tourist_id where visitors.tourist_details = 'Rosalind'" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many tourists did not make any visit? | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from visitors where tourist_id not in ( select tourist_id from visits )" }, { "db_id": "cre_Theme_park", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of tourists who did not visit any place. | ref_hotel_star_ratings : star_rating_code , star_rating_description | locations : location_id , location_name , address , other_details | ref_attraction_types : attraction_type_code , attraction_type_description | visitors : tourist_id , tourist_details | features : feature_id , feature_details | hotels : hotel_id , star_rating_code , pets_allowed_yn , price_range , other_hotel_details | tourist_attractions : tourist_attraction_id , attraction_type_code , location_id , how_to_get_there , name , description , opening_hours , other_details | street_markets : market_id , market_details | shops : shop_id , shop_details | museums : museum_id , museum_details | royal_family : royal_family_id , royal_family_details | theme_parks : theme_park_id , theme_park_details | visits : visit_id , tourist_attraction_id , tourist_id , visit_date , visit_details | photos : photo_id , tourist_attraction_id , name , description , filename , other_details | staff : staff_id , tourist_attraction_id , name , other_details | tourist_attraction_features : tourist_attraction_id , feature_id | hotels.star_rating_code = ref_hotel_star_ratings.star_rating_code | tourist_attractions.attraction_type_code = ref_attraction_types.attraction_type_code | tourist_attractions.location_id = locations.location_id | street_markets.market_id = tourist_attractions.tourist_attraction_id | shops.shop_id = tourist_attractions.tourist_attraction_id | museums.museum_id = tourist_attractions.tourist_attraction_id | royal_family.royal_family_id = tourist_attractions.tourist_attraction_id | theme_parks.theme_park_id = tourist_attractions.tourist_attraction_id | visits.tourist_id = visitors.tourist_id | visits.tourist_attraction_id = tourist_attractions.tourist_attraction_id | photos.tourist_attraction_id = tourist_attractions.tourist_attraction_id | staff.tourist_attraction_id = tourist_attractions.tourist_attraction_id | tourist_attraction_features.feature_id = features.feature_id | tourist_attraction_features.tourist_attraction_id = tourist_attractions.tourist_attraction_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from visitors where tourist_id not in ( select tourist_id from visits )" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many video games exist? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from video_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many video games do you have? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from video_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many video game types exist? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct gtype ) from video_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of different game types? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct gtype ) from video_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all video game types. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct gtype from video_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different types of video games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect distinct _ from _ | select distinct gtype from video_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all video games and their types in the order of their names. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select gname , gtype from video_games order by gname asc" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the video games and their types in alphabetical order? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ order by _ asc | select gname , gtype from video_games order by gname asc" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all video games with type Collectible card game. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select gname from video_games where gtype = 'Collectible card game'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all video games that are collectible cards? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select gname from video_games where gtype = 'Collectible card game'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type of video game Call of Destiny. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select gtype from video_games where gname = 'Call of Destiny'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What type of game is Call of Destiny? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select gtype from video_games where gname = 'Call of Destiny'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many video games have type Massively multiplayer online game? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from video_games where gtype = 'Massively multiplayer online game'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of video games with Massively multiplayer online game type . | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from video_games where gtype = 'Massively multiplayer online game'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all video game types and the number of video games in each type. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select gtype , count ( * ) from video_games group by gtype" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the types of video games and how many are in each type? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select gtype , count ( * ) from video_games group by gtype" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which game type has most number of games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select gtype from video_games group by gtype order by count ( * ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What type has the most games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select gtype from video_games group by gtype order by count ( * ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which game type has least number of games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select gtype from video_games group by gtype order by count ( * ) asc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the type with the fewest games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select gtype from video_games group by gtype order by count ( * ) asc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all students who live in CHI. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where city_code = 'CHI'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all students who live in CHI? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where city_code = 'CHI'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all students who have advisor 1121. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where advisor = 1121" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all students who have advisor number 1121? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from student where advisor = 1121" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show first name for all students with major 600. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname from student where major = 600" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names for all students who are from the major numbered 600? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select fname from student where major = 600" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the average, minimum, and maximum age for different majors. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , avg ( _ ) , min ( _ ) , max ( _ ) from _ group by _ | select major , avg ( age ) , min ( age ) , max ( age ) from student group by major" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average, minimum, and max ages for each of the different majors? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , avg ( _ ) , min ( _ ) , max ( _ ) from _ group by _ | select major , avg ( age ) , min ( age ) , max ( age ) from student group by major" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all advisors who have at least two students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select advisor from student group by advisor having count ( * ) >= 2" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the advisors | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select advisor from student group by advisor having count ( * ) >= 2" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many sports do we have? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct sportname ) from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different types of sports do we offer? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct sportname ) from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students play sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct stuid ) from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different students are involved in sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct stuid ) from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List ids for all student who are on scholarship. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from sportsinfo where onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids for all sporty students who are on scholarship? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select stuid from sportsinfo where onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show last names for all student who are on scholarship. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid where sportsinfo.onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names for all scholarship students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid where sportsinfo.onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games are played for all students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( gamesplayed ) from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of games played? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( gamesplayed ) from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many games are played for all football games by students on scholarship? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( gamesplayed ) from sportsinfo where sportname = 'Football' and onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of all football games played by scholarship students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( gamesplayed ) from sportsinfo where sportname = 'Football' and onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all sport name and the number of students. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select sportname , count ( * ) from sportsinfo group by sportname" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students play each sport? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select sportname , count ( * ) from sportsinfo group by sportname" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all student IDs with the number of sports and total number of games played | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) , sum ( _ ) from _ group by _ | select stuid , count ( * ) , sum ( gamesplayed ) from sportsinfo group by stuid" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all students along with how many sports and games did they play? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , count ( _ ) , sum ( _ ) from _ group by _ | select stuid , count ( * ) , sum ( gamesplayed ) from sportsinfo group by stuid" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all student IDs with more than total 10 hours per week on all sports played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select stuid from sportsinfo group by stuid having sum ( hoursperweek ) > 10" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the student IDs for everybody who worked for more than 10 hours per week on all sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) > _ | select stuid from sportsinfo group by stuid having sum ( hoursperweek ) > 10" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name and last name of the student who have most number of sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select student.fname , student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid group by sportsinfo.stuid order by count ( * ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the student who played the most sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select student.fname , student.lname from sportsinfo join student on sportsinfo.stuid = student.stuid group by sportsinfo.stuid order by count ( * ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which sport has most number of students on scholarship? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select sportname from sportsinfo where onscholarship = 'Y' group by sportname order by count ( * ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the sport with the most scholarship students? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select sportname from sportsinfo where onscholarship = 'Y' group by sportname order by count ( * ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show student ids who don't have any sports. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all students who don't play sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from sportsinfo" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show student ids who are on scholarship and have major 600. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select stuid from student where major = 600 intersect select stuid from sportsinfo where onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the student ids for those on scholarship in major number 600? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select stuid from student where major = 600 intersect select stuid from sportsinfo where onscholarship = 'Y'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show student ids who are female and play football. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select stuid from student where sex = 'F' intersect select stuid from sportsinfo where sportname = 'Football'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all female students who play football? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select stuid from student where sex = 'F' intersect select stuid from sportsinfo where sportname = 'Football'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all male student ids who don't play football. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select stuid from student where sex = 'M' except select stuid from sportsinfo where sportname = 'Football'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all male students who do not play football? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select stuid from student where sex = 'M' except select stuid from sportsinfo where sportname = 'Football'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show total hours per week and number of games played for student David Shieber. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) , sum ( _ ) from _ where _ | select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.fname = 'David' and student.lname = 'Shieber'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of hours per work and number of games played by David Shieber? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) , sum ( _ ) from _ where _ | select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.fname = 'David' and student.lname = 'Shieber'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show total hours per week and number of games played for students under 20. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) , sum ( _ ) from _ where _ | select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.age < 20" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of hours per week and number of games played by students under 20? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect sum ( _ ) , sum ( _ ) from _ where _ | select sum ( hoursperweek ) , sum ( gamesplayed ) from sportsinfo join student on sportsinfo.stuid = student.stuid where student.age < 20" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students play video games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct stuid ) from plays_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different students play games? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct stuid ) from plays_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids of students who don't play video game. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from plays_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all students who are not video game players? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from plays_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids of students who play video game and play sports. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select stuid from sportsinfo intersect select stuid from plays_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all students who played video games and sports? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select stuid from sportsinfo intersect select stuid from plays_games" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all game ids and the number of hours played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select gameid , sum ( hours_played ) from plays_games group by gameid" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are ids and total number of hours played for each game? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select gameid , sum ( hours_played ) from plays_games group by gameid" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all student ids and the number of hours played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select stuid , sum ( hours_played ) from plays_games group by stuid" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all students and number of hours played? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ , sum ( _ ) from _ group by _ | select stuid , sum ( hours_played ) from plays_games group by stuid" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the game name that has most number of hours played. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select gname from plays_games join video_games on plays_games.gameid = video_games.gameid group by plays_games.gameid order by sum ( hours_played ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the game that has been played the most? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select gname from plays_games join video_games on plays_games.gameid = video_games.gameid group by plays_games.gameid order by sum ( hours_played ) desc limit 1" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all game names played by at least 1000 hours. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) >= _ | select gname from plays_games join video_games on plays_games.gameid = video_games.gameid group by plays_games.gameid having sum ( hours_played ) >= 1000" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the games that have been played for at least 1000 hours? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ group by _ having sum ( _ ) >= _ | select gname from plays_games join video_games on plays_games.gameid = video_games.gameid group by plays_games.gameid having sum ( hours_played ) >= 1000" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all game names played by Linda Smith | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select gname from plays_games join video_games on plays_games.gameid = video_games.gameid join student on student.stuid = plays_games.stuid where student.lname = 'Smith' and student.fname = 'Linda'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all games played by Linda Smith? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select gname from plays_games join video_games on plays_games.gameid = video_games.gameid join student on student.stuid = plays_games.stuid where student.lname = 'Smith' and student.fname = 'Linda'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last and first name of students who are playing Football or Lacrosse. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname , student.fname from sportsinfo join student on sportsinfo.stuid = student.stuid where sportsinfo.sportname = 'Football' or sportsinfo.sportname = 'Lacrosse'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of all students who play Football or Lacrosse? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ | select student.lname , student.fname from sportsinfo join student on sportsinfo.stuid = student.stuid where sportsinfo.sportname = 'Football' or sportsinfo.sportname = 'Lacrosse'" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first name and age of the students who are playing both Football and Lacrosse. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select fname , age from student where stuid in ( select stuid from sportsinfo where sportname = 'Football' intersect select stuid from sportsinfo where sportname = 'Lacrosse' )" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names and ages of all students who are playing both Football and Lacrosse? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select fname , age from student where stuid in ( select stuid from sportsinfo where sportname = 'Football' intersect select stuid from sportsinfo where sportname = 'Lacrosse' )" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games. | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select lname , sex from student where stuid in ( select plays_games.stuid from plays_games join video_games on plays_games.gameid = video_games.gameid where video_games.gname = 'Call of Destiny' intersect select plays_games.stuid from plays_games join video_games on plays_games.gameid = video_games.gameid where video_games.gname = 'Works of Widenius' )" }, { "db_id": "game_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the last name and gender of all students who played both Call of Destiny and Works of Widenius? | student : stuid , lname , fname , age , sex , major , advisor , city_code | video_games : gameid , gname , gtype | plays_games : stuid , gameid , hours_played | sportsinfo : stuid , sportname , hoursperweek , gamesplayed , onscholarship | plays_games.stuid = student.stuid | plays_games.gameid = video_games.gameid | sportsinfo.stuid = student.stuid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ intersect select _ from _ where _ ) | select lname , sex from student where stuid in ( select plays_games.stuid from plays_games join video_games on plays_games.gameid = video_games.gameid where video_games.gname = 'Call of Destiny' intersect select plays_games.stuid from plays_games join video_games on plays_games.gameid = video_games.gameid where video_games.gname = 'Works of Widenius' )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of all customers. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ | select customer_name from customers" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the customers? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ | select customer_name from customers" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are there? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the total number of distinct customers. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average amount of items ordered in each order? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( order_quantity ) from order_items" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average order quantity per order. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( order_quantity ) from order_items" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who use payment method \"Cash\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_name from customers where payment_method = 'Cash'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers use \"Cash\" for payment method? Return the customer names. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_name from customers where payment_method = 'Cash'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the \"date became customers\" of the customers whose ID is between 10 and 20. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select date_became_customer from customers where customer_id between 10 and 20" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates when customers with ids between 10 and 20 became customers? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select date_became_customer from customers where customer_id between 10 and 20" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which payment method is used by most customers? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method from customers group by payment_method order by count ( * ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the payment method that is used most frequently. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select payment_method from customers group by payment_method order by count ( * ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers using the most popular payment method? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select customer_name from customers where payment_method = ( select payment_method from customers group by payment_method order by count ( * ) desc limit 1 )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the customers who use the most frequently used payment method. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select customer_name from customers where payment_method = ( select payment_method from customers group by payment_method order by count ( * ) desc limit 1 )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the payment methods? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct payment_method from customers" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return all the distinct payment methods used by customers. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct payment_method from customers" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of all products? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct product_details from products" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the the details of all products. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct product_details from products" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of all customers whose name contains \"Alex\". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_name from customers where customer_name like '%Alex%'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer's name contains \"Alex\"? Find the full name. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select customer_name from customers where customer_name like '%Alex%'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the detail of products whose detail contains the word \"Latte\" or the word \"Americano\" | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ like _ or _ like _ | select product_details from products where product_details like '%Latte%' or product_details like '%Americano%'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which product's detail contains the word \"Latte\" or \"Americano\"? Return the full detail. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ like _ or _ like _ | select product_details from products where product_details like '%Latte%' or product_details like '%Americano%'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the address content of the customer named \"Maudie Kertzmann\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.address_content from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where customers.customer_name = 'Maudie Kertzmann'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the address content for the customer whose name is \"Maudie Kertzmann\". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.address_content from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where customers.customer_name = 'Maudie Kertzmann'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are living in city \"Lake Geovannyton\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where addresses.city = 'Lake Geovannyton'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of customers who live in the city called Lake Geovannyton. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where addresses.city = 'Lake Geovannyton'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers who are living in Colorado? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where addresses.state_province_county = 'Colorado'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who live in Colorado state? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id where addresses.state_province_county = 'Colorado'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the list of cities that no customer is living in. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select distinct _ from _ ) | select city from addresses where city not in ( select distinct addresses.city from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the cities no customers live in? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select distinct _ from _ ) | select city from addresses where city not in ( select distinct addresses.city from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city has the most customers living in? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select addresses.city from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city where the most customers live. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select addresses.city from customers join customer_addresses on customers.customer_id = customer_addresses.customer_id join addresses on customer_addresses.address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Retrieve the list of all cities. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct city from addresses" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the distinct cities | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct city from addresses" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city with post code 255. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select city from addresses where zip_postcode = 255" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city is post code 255 located in? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select city from addresses where zip_postcode = 255" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the state and country of all cities with post code starting with 4. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select state_province_county , country from addresses where zip_postcode like '4%'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the state and country of all the cities that have post codes starting with 4.\\ | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select state_province_county , country from addresses where zip_postcode like '4%'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the countries having more than 4 addresses listed. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select country from addresses group by country having count ( address_id ) > 4" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For which countries are there more than four distinct addresses listed? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select country from addresses group by country having count ( address_id ) > 4" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the contact channel codes that were used less than 5 times. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) < _ | select channel_code from customer_contact_channels group by channel_code having count ( customer_id ) < 5" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which contact channel codes were used less than 5 times? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) < _ | select channel_code from customer_contact_channels group by channel_code having count ( customer_id ) < 5" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which contact channel has been used by the customer with name \"Tillman Ernser\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct channel_code from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customers.customer_name = 'Tillman Ernser'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the contact channel code that was used by the customer named \"Tillman Ernser\". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct channel_code from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customers.customer_name = 'Tillman Ernser'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( customer_contact_channels.active_to_date ) from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customers.customer_name = 'Tillman Ernser'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the the \"active to date\" of the latest contact channel used by the customer named \"Tillman Ernser\". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( customer_contact_channels.active_to_date ) from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customers.customer_name = 'Tillman Ernser'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average time span of contact channels in the database? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect avg ( _ - _ ) from _ | select avg ( active_to_date - active_from_date ) from customer_contact_channels" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Compute the average active time span of contact channels. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect avg ( _ - _ ) from _ | select avg ( active_to_date - active_from_date ) from customer_contact_channels" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the channel code and contact number of the customer contact channel that was active for the longest time? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ - _ = ( select _ - _ from _ order by ( _ - _ ) desc limit _ ) | select channel_code , contact_number from customer_contact_channels where active_to_date - active_from_date = ( select active_to_date - active_from_date from customer_contact_channels order by ( active_to_date - active_from_date ) desc limit 1 )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the channel code and contact number of the customer contact channel whose active duration was the longest. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ - _ = ( select _ - _ from _ order by ( _ - _ ) desc limit _ ) | select channel_code , contact_number from customer_contact_channels where active_to_date - active_from_date = ( select active_to_date - active_from_date from customer_contact_channels order by ( active_to_date - active_from_date ) desc limit 1 )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and active date of the customer that use email as the contact channel. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name , customer_contact_channels.active_from_date from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customer_contact_channels.channel_code = 'Email'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and active date of the customers whose contact channel code is email? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name , customer_contact_channels.active_from_date from customers join customer_contact_channels on customers.customer_id = customer_contact_channels.customer_id where customer_contact_channels.channel_code = 'Email'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer that made the order with the largest quantity? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where order_items.order_quantity = ( select max ( order_quantity ) from order_items )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the customer who made the order of the largest amount of goods. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where order_items.order_quantity = ( select max ( order_quantity ) from order_items )" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer that has purchased the most items? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the name of the customer who ordered the most items in total. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) desc limit _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the payment method of the customer that has purchased the least quantity of items? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc limit _ | select customers.payment_method from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) asc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the payment method used by the customer who ordered the least amount of goods in total. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc limit _ | select customers.payment_method from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id group by customers.customer_name order by sum ( order_items.order_quantity ) asc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many types of products have Rodrick Heaney bought in total? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct order_items.product_id ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct products Rodrick Heaney has bought so far. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct order_items.product_id ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total quantity of products purchased by \"Rodrick Heaney\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the total quantity of products bought by the customer called \"Rodrick Heaney\". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id where customers.customer_name = 'Rodrick Heaney'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers have at least one order with status \"Cancelled\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct customer_id ) from customer_orders where order_status = 'Cancelled'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the number of customers who have at least one order with \"Cancelled\" status. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct customer_id ) from customer_orders where order_status = 'Cancelled'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many orders have detail \"Second time\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customer_orders where order_details = 'Second time'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the number of orders with \"Second time\" as order detail. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from customer_orders where order_details = 'Second time'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the customer name and date of the orders that have the status \"Delivered\". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name , customer_orders.order_date from customers join customer_orders on customers.customer_id = customer_orders.customer_id where order_status = 'Delivered'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the customer name and date of the orders whose status is \"Delivered\". | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name , customer_orders.order_date from customers join customer_orders on customers.customer_id = customer_orders.customer_id where order_status = 'Delivered'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of products that are in orders with status \"Cancelled\"? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_status = 'Cancelled'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total quantity of products associated with the orders in the \"Cancelled\" status. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_status = 'Cancelled'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total amount of products ordered before 2018-03-17 07:13:53. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_date < '2018-03-17 07:13:53'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of products purchased before 2018-03-17 07:13:53? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( order_items.order_quantity ) from customer_orders join order_items on customer_orders.order_id = order_items.order_id where customer_orders.order_date < '2018-03-17 07:13:53'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who made the latest order? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id order by customer_orders.order_date desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the customer who made an order most recently. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id order by customer_orders.order_date desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which product has been ordered most number of times? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select products.product_details from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most frequently ordered product? Tell me the detail of the product | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select products.product_details from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by count ( * ) desc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and ID of the product whose total order quantity is the largest. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc limit _ | select products.product_details , products.product_id from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by sum ( order_items.order_quantity ) asc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the name and ID of the product bought the most. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ group by _ order by sum ( _ ) asc limit _ | select products.product_details , products.product_id from order_items join products on order_items.product_id = products.product_id group by order_items.product_id order by sum ( order_items.order_quantity ) asc limit 1" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select address_content from addresses where city = 'East Julianaside' and state_province_county = 'Texas' union select address_content from addresses where city = 'Gleasonmouth' and state_province_county = 'Arizona'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select address_content from addresses where city = 'East Julianaside' and state_province_county = 'Texas' union select address_content from addresses where city = 'Gleasonmouth' and state_province_county = 'Arizona'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of customers who did not pay with Cash. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_name from customers where payment_method != 'Cash'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of customers who do not use Cash as payment method. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_name from customers where payment_method != 'Cash'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who never ordered product Latte. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are names of customers who never ordered product Latte. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who never placed an order. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who never made an order. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select customer_name from customers except select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of customers who ordered both products Latte and Americano. | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte' intersect select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Americano'" }, { "db_id": "customers_and_addresses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of customers who have purchased both products Latte and Americano? | addresses : address_id , address_content , city , zip_postcode , state_province_county , country , other_address_details | products : product_id , product_details | customers : customer_id , payment_method , customer_name , date_became_customer , other_customer_details | customer_addresses : customer_id , address_id , date_address_from , address_type , date_address_to | customer_contact_channels : customer_id , channel_code , active_from_date , active_to_date , contact_number | customer_orders : order_id , customer_id , order_status , order_date , order_details | order_items : order_id , product_id , order_quantity | customer_addresses.customer_id = customers.customer_id | customer_addresses.address_id = addresses.address_id | customer_contact_channels.customer_id = customers.customer_id | customer_orders.customer_id = customers.customer_id | order_items.order_id = customer_orders.order_id | order_items.product_id = products.product_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Latte' intersect select customers.customer_name from customers join customer_orders on customers.customer_id = customer_orders.customer_id join order_items on customer_orders.order_id = order_items.order_id join products on order_items.product_id = products.product_id where products.product_details = 'Americano'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many artists are there? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the age of all music artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ | select age from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ages of all music artists? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ | select age from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average age of all artists? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( age ) from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average age across all artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( age ) from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the famous titles of the artist \"Triumfall\"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select famous_title from artist where artist = 'Triumfall'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the famous titles of the artist called \"Triumfall\". | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select famous_title from artist where artist = 'Triumfall'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct Famous release dates? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( famous_release_date ) from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the distinct famous release dates for all artists. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect distinct ( _ ) from _ | select distinct ( famous_release_date ) from artist" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the dates of ceremony and the results of all music festivals | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ | select date_of_ceremony , result from music_festival" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of ceremony and results for each music festival? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ | select date_of_ceremony , result from music_festival" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the category of music festivals with result \"Awarded\"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select category from music_festival where result = 'Awarded'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the categories of music festivals that have the result \"Awarded\". | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select category from music_festival where result = 'Awarded'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum and minimum week on top of all volumes? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( weeks_on_top ) , min ( weeks_on_top ) from volume" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the maximum and minimum weeks on top across all volumes. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) from _ | select max ( weeks_on_top ) , min ( weeks_on_top ) from volume" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the songs in volumes with more than 1 week on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select song from volume where weeks_on_top > 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the songs included in volumes that have more than 1 week on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select song from volume where weeks_on_top > 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list all songs in volumes in ascending alphabetical order. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select song from volume order by song asc" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the the songs in volumes, listed in ascending order? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select song from volume order by song asc" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct artists do the volumes associate to? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct artist_id ) from volume" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of distinct artists who have volumes. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct artist_id ) from volume" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the date of ceremony of the volumes that last more than 2 weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select music_festival.date_of_ceremony from music_festival join volume on music_festival.volume = volume.volume_id where volume.weeks_on_top > 2" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select music_festival.date_of_ceremony from music_festival join volume on music_festival.volume = volume.volume_id where volume.weeks_on_top > 2" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the songs that have result \"nominated\" at music festivals. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select volume.song from music_festival join volume on music_festival.volume = volume.volume_id where music_festival.result = 'Nominated'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the songs in volumes that have resulted in a nomination at music festivals? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select volume.song from music_festival join volume on music_festival.volume = volume.volume_id where music_festival.result = 'Nominated'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the issue dates of volumes associated with the artist \"Gorgoroth\"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select volume.issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.artist = 'Gorgoroth'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the issue dates of volumes that are by the artist named Gorgoroth. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select volume.issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.artist = 'Gorgoroth'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the songs in volumes associated with the artist aged 32 or older? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select volume.song from artist join volume on artist.artist_id = volume.artist_id where artist.age >= 32" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return names of songs in volumes that are by artists that are at least 32 years old. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select volume.song from artist join volume on artist.artist_id = volume.artist_id where artist.age >= 32" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average weeks on top of volumes associated with the artist aged 25 or younger? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( volume.weeks_on_top ) from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 25" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average number of weeks on top for volumes by artists that are at most 25 years old. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( volume.weeks_on_top ) from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 25" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the famous title of the artists associated with volumes with more than 2 weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the famous titles for artists that have volumes that lasted more than 2 weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please list the age and famous title of artists in descending order of age. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select famous_title , age from artist order by age desc" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the famous titles and ages of each artist, listed in descending order by age? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select famous_title , age from artist order by age desc" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the famous release date of the artist with the oldest age? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select famous_release_date from artist order by age desc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the famous release date for the oldest artist. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select famous_release_date from artist order by age desc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the categories of the music festivals and the count. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select category , count ( * ) from music_festival group by category" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the number of music festivals of each category. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select category , count ( * ) from music_festival group by category" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common result of the music festival? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select result from music_festival group by result order by count ( * ) desc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the result that is most frequent at music festivals. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select result from music_festival group by result order by count ( * ) desc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the categories of the music festivals with count more than 1. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select category from music_festival group by category having count ( * ) > 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the categories of music festivals for which there have been more than 1 music festival? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select category from music_festival group by category having count ( * ) > 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the song in the volume with the maximum weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select song from volume order by weeks_on_top desc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the song in the volume that has spent the most weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select song from volume order by weeks_on_top desc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the famous titles of artists that do not have any volume. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select famous_title from artist where artist_id not in ( select artist_id from volume )" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the famous titles of artists who do not have any volumes? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select famous_title from artist where artist_id not in ( select artist_id from volume )" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2 intersect select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top < 2" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top > 2 intersect select artist.famous_title from artist join volume on artist.artist_id = volume.artist_id where volume.weeks_on_top < 2" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the date of ceremony of music festivals with category \"Best Song\" and result \"Awarded\"? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_ceremony from music_festival where category = 'Best Song' and result = 'Awarded'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the dates of ceremony corresponding to music festivals that had the category \"Best Song\" and result \"Awarded\". | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_ceremony from music_festival where category = 'Best Song' and result = 'Awarded'" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the issue date of the volume with the minimum weeks on top? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select issue_date from volume order by weeks_on_top asc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the issue date of the volume that has spent the fewest weeks on top. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select issue_date from volume order by weeks_on_top asc limit 1" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct artists have volumes? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct artist_id ) from volume" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of artists who have had volumes. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct artist_id ) from volume" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the results of music festivals and the number of music festivals that have had each, ordered by this count. | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select result , count ( * ) from music_festival group by result order by count ( * ) desc" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many music festivals have had each kind of result, ordered descending by count? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select result , count ( * ) from music_festival group by result order by count ( * ) desc" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the issue dates of volumes associated with the artist aged 23 or younger? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 23" }, { "db_id": "music_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the issue dates of volumes by artists who are at most 23 years old? | artist : artist_id , artist , age , famous_title , famous_release_date | volume : volume_id , volume_issue , issue_date , weeks_on_top , song , artist_id | music_festival : id , music_festival , date_of_ceremony , category , volume , result | volume.artist_id = artist.artist_id | music_festival.volume = volume.volume_id | \n\n### Response:\n\nselect _ from _ where _ | select issue_date from artist join volume on artist.artist_id = volume.artist_id where artist.age <= 23" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many roller coasters are there? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from roller_coaster" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of roller coasters by ascending order of length. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from roller_coaster order by length asc" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the lengths and heights of roller coasters? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ | select length , height from roller_coaster" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of countries whose language is not \"German\". | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ where _ | select name from country where languages != 'German'" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the statuses of roller coasters longer than 3300 or higher than 100. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ where _ | select status from roller_coaster where length > 3300 or height > 100" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the speeds of the longest roller coaster? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select speed from roller_coaster order by length desc limit 1" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average speed of roller coasters? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( speed ) from roller_coaster" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the different statuses and the numbers of roller coasters for each status. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select status , count ( * ) from roller_coaster group by status" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please show the most common status of roller coasters. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select status from roller_coaster group by status order by count ( * ) desc limit 1" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the status shared by more than two roller coaster. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select status from roller_coaster group by status having count ( * ) > 2" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the park of the roller coaster with the highest speed. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select park from roller_coaster order by speed desc limit 1" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of roller coasters and names of country they are in. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ | select roller_coaster.name , country.name from country join roller_coaster on country.country_id = roller_coaster.country_id" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of countries that have more than one roller coaster. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select country.name from country join roller_coaster on country.country_id = roller_coaster.country_id group by country.name having count ( * ) > 1" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and population of the country that has the highest roller coaster. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select country.name , country.population from country join roller_coaster on country.country_id = roller_coaster.country_id order by roller_coaster.height desc limit 1" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of countries and the average speed of roller coasters from each country. | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ , avg ( _ ) from _ group by _ | select country.name , avg ( roller_coaster.speed ) from country join roller_coaster on country.country_id = roller_coaster.country_id group by country.name" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many countries do not have an roller coaster longer than 3000? | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from country where country_id not in ( select country_id from roller_coaster where length > 3000 )" }, { "db_id": "roller_coaster", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the country names, area and population which has both roller coasters with speed higher | roller_coaster : roller_coaster_id , name , park , country_id , length , height , speed , opened , status | country : country_id , name , population , area , languages | roller_coaster.country_id = country.country_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select country.name , country.area , country.population from country join roller_coaster on country.country_id = roller_coaster.country_id where roller_coaster.speed > 60 intersect select country.name , country.area , country.population from country join roller_coaster on country.country_id = roller_coaster.country_id where roller_coaster.speed < 55" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different captain ranks are there? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct rank ) from captain" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different ranks of captain. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct rank ) from captain" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many captains are in each rank? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , rank from captain group by rank" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of captains that have each rank. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , rank from captain group by rank" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many captains with younger than 50 are in each rank? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , rank from captain where age < 50 group by rank" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of captains younger than 50 of each rank. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , rank from captain where age < 50 group by rank" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort all captain names by their ages from old to young. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from captain order by age desc" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of captains, sorted by age descending? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from captain order by age desc" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, class and rank of all captains. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ | select name , class , rank from captain" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names, classes, and ranks of all captains? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ | select name , class , rank from captain" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which rank is the most common among captains? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select rank from captain group by rank order by count ( * ) desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the rank for which there are the fewest captains. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select rank from captain group by rank order by count ( * ) desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which classes have more than two captains? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select class from captain group by class having count ( * ) > 2" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the classes that have more than two captains. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select class from captain group by class having count ( * ) > 2" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of captains whose rank are either Midshipman or Lieutenant. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select name from captain where rank = 'Midshipman' or rank = 'Lieutenant'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of captains that have either the rank Midshipman or Lieutenant? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ | select name from captain where rank = 'Midshipman' or rank = 'Lieutenant'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average and minimum age of captains in different class? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , _ from _ group by _ | select avg ( age ) , min ( age ) , class from captain group by class" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average and minimum age of captains in each class. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect avg ( _ ) , min ( _ ) , _ from _ group by _ | select avg ( age ) , min ( age ) , class from captain group by class" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the captain rank that has some captains in both Cutter and Armed schooner classes. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ranks of captains that are both in the Cutter and Armed schooner classes? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the captain rank that has no captain in Third-rate ship of the line class. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select rank from captain except select rank from captain where class = 'Third-rate ship of the line'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ranks of captains that have no captain that are in the Third-rate ship of the line class? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select rank from captain except select rank from captain where class = 'Third-rate ship of the line'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the youngest captain? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from captain order by age asc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the youngest captain. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from captain order by age asc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many ships are there? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ship" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of ships. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ship" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, type, and flag of the ship that is built in the most recent year. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , type , flag from ship order by built_year desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, type, and flag of the ship that was built in the most recent year? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , type , flag from ship order by built_year desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Group by ships by flag, and return number of ships that have each flag. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , flag from ship group by flag" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different ship flags, and how many ships have each? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , flag from ship group by flag" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which flag is most widely used among all ships? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select flag from ship group by flag order by count ( * ) desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the flag that is most common among all ships. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select flag from ship group by flag order by count ( * ) desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all ship names in the order of built year and class. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select name from ship order by built_year asc , class" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of ships, ordered by year they were built and their class? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select name from ship order by built_year asc , class" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ship type that are used by both ships with Panama and Malta flags. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What types of ships have both ships that have Panama Flags and Malta flags? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which year were most of ships built? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select built_year from ship group by built_year order by count ( * ) desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the year in which most ships were built? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select built_year from ship group by built_year order by count ( * ) desc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the ships that have more than one captain. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id group by captain.ship_id having count ( * ) > 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of ships that have more than one captain? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id group by captain.ship_id having count ( * ) > 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the names and classes of the ships that do not have any captain yet? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name , class from ship where ship_id not in ( select ship_id from captain )" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the names and classes of ships that do not have a captain? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name , class from ship where ship_id not in ( select ship_id from captain )" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the ship that is steered by the youngest captain. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id order by captain.age asc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the ship that is commanded by the youngest captain? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id order by captain.age asc limit 1" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and flag of ships that are not steered by any captain with Midshipman rank. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name , flag from ship where ship_id not in ( select ship_id from captain where rank = 'Midshipman' )" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and flags of ships that do not have a captain with the rank of Midshipman? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select name , flag from ship where ship_id not in ( select ship_id from captain where rank = 'Midshipman' )" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank. | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Midshipman' intersect select ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Lieutenant'" }, { "db_id": "ship_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant? | captain : captain_id , name , ship_id , age , class , rank | ship : ship_id , name , type , built_year , class , flag | captain.ship_id = ship.ship_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Midshipman' intersect select ship.name from ship join captain on ship.ship_id = captain.ship_id where captain.rank = 'Lieutenant'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is id of the city that hosted events in the most recent year? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select host_city from hosting_city order by year desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city that hosted some events in the most recent year. What is the id of this city? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select host_city from hosting_city order by year desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the match ids of the cities that hosted competition \"1994 FIFA World Cup qualification\"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select match_id from match where competition = '1994 FIFA World Cup qualification'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the match id of the competition called \"1994 FIFA World Cup qualification\"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select match_id from match where competition = '1994 FIFA World Cup qualification'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the cities which were once a host city after 2010? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select city.city from city join hosting_city on city.city_id = hosting_city.host_city where hosting_city.year > 2010" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities served as a host city after 2010? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select city.city from city join hosting_city on city.city_id = hosting_city.host_city where hosting_city.year > 2010" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city has hosted the most events? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select city.city from city join hosting_city on city.city_id = hosting_city.host_city group by hosting_city.host_city order by count ( * ) desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the city that hosted the most events. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select city.city from city join hosting_city on city.city_id = hosting_city.host_city group by hosting_city.host_city order by count ( * ) desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the venue of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select match.venue from city join hosting_city on city.city_id = hosting_city.host_city join match on hosting_city.match_id = match.match_id where city.city = 'Nanjing ( Jiangsu )' and match.competition = '1994 FIFA World Cup qualification'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the venue of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\". | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select match.venue from city join hosting_city on city.city_id = hosting_city.host_city join match on hosting_city.match_id = match.match_id where city.city = 'Nanjing ( Jiangsu )' and match.competition = '1994 FIFA World Cup qualification'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the temperature of Shanghai in January. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select temperature.jan from city join temperature on city.city_id = temperature.city_id where city.city = 'Shanghai'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the temperature of \"Shanghai\" city in January? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select temperature.jan from city join temperature on city.city_id = temperature.city_id where city.city = 'Shanghai'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the host year of city \"Taizhou ( Zhejiang )\"? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select hosting_city.year from city join hosting_city on city.city_id = hosting_city.host_city where city.city = 'Taizhou ( Zhejiang )'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: IN which year did city \"Taizhou ( Zhejiang )\" serve as a host city? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select hosting_city.year from city join hosting_city on city.city_id = hosting_city.host_city where city.city = 'Taizhou ( Zhejiang )'" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which three cities have the largest regional population? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select city from city order by regional_population desc limit 3" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the three largest cities in terms of regional population? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select city from city order by regional_population desc limit 3" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city has the lowest GDP? Please list the city name and its GDP. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select city , gdp from city order by gdp asc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the city with the smallest GDP? Return the city and its GDP. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select city , gdp from city order by gdp asc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city has the highest temperature in February? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select city.city from city join temperature on city.city_id = temperature.city_id order by temperature.feb desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In February, which city marks the highest temperature? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select city.city from city join temperature on city.city_id = temperature.city_id order by temperature.feb desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul or temperature.mar > temperature.oct" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities' temperature in March is lower than that in July or higher than that in Oct? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul or temperature.mar > temperature.oct" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul intersect select city.city from city join hosting_city on city.city_id = hosting_city.host_city" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have lower temperature in March than in July and have been once host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.jul intersect select city.city from city join hosting_city on city.city_id = hosting_city.host_city" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.dec except select city.city from city join hosting_city on city.city_id = hosting_city.host_city" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have lower temperature in March than in Dec and have never served as host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.mar < temperature.dec except select city.city from city join hosting_city on city.city_id = hosting_city.host_city" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.feb > temperature.jun union select city.city from city join hosting_city on city.city_id = hosting_city.host_city" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have higher temperature in Feb than in Jun or have once served as host cities? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ | select city.city from city join temperature on city.city_id = temperature.city_id where temperature.feb > temperature.jun union select city.city from city join hosting_city on city.city_id = hosting_city.host_city" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please give me a list of cities whose regional population is over 10000000. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select city from city where regional_population > 10000000" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have regional population above 10000000? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ | select city from city where regional_population > 10000000" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Please give me a list of cities whose regional population is over 8000000 or under 5000000. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select city from city where regional_population > 10000000 union select city from city where regional_population < 5000000" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have regional population above 8000000 or below 5000000? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ where _ union select _ from _ where _ | select city from city where regional_population > 10000000 union select city from city where regional_population < 5000000" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of matches in different competitions. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , competition from match group by competition" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each competition, count the number of matches. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , competition from match group by competition" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List venues of all matches in the order of their dates starting from the most recent one. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select venue from match order by date desc" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the venues of all the matches? Sort them in the descending order of match date. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select venue from match order by date desc" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what is the GDP of the city with the largest population. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select gdp from city order by regional_population desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the GDP of the city with the largest regional population. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select gdp from city order by regional_population desc limit 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the GDP and population of the city that already served as a host more than once? | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select city.gdp , city.regional_population from city join hosting_city on city.city_id = hosting_city.host_city group by hosting_city.host_city having count ( * ) > 1" }, { "db_id": "city_record", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which cities have served as host cities more than once? Return me their GDP and population. | city : city_id , city , hanzi , hanyu_pinyin , regional_population , gdp | match : match_id , date , venue , score , result , competition | temperature : city_id , jan , feb , mar , apr , jun , jul , aug , sep , oct , nov , dec | hosting_city : year , match_id , host_city | temperature.city_id = city.city_id | hosting_city.match_id = match.match_id | hosting_city.host_city = city.city_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select city.gdp , city.regional_population from city join hosting_city on city.city_id = hosting_city.host_city group by hosting_city.host_city having count ( * ) > 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List every individual's first name, middle name and last name in alphabetical order by last name. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select individual_first_name , individual_middle_name , individual_last_name from individuals order by individual_last_name asc" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first, middle, and last names of all individuals, ordered by last name? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select individual_first_name , individual_middle_name , individual_last_name from individuals order by individual_last_name asc" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the types of forms. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct form_type_code from forms" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different types of forms? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct form_type_code from forms" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the most popular party form. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select forms.form_name from forms join party_forms on forms.form_id = party_forms.form_id group by party_forms.form_id order by count ( * ) desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the party form that is most common? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select forms.form_name from forms join party_forms on forms.form_id = party_forms.form_id group by party_forms.form_id order by count ( * ) desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the payment method and phone of the party with email \"enrico09@example.com\". | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ | select payment_method_code , party_phone from parties where party_email = 'enrico09@example.com'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the payment method code and party phone of the party with the email 'enrico09@example.com'? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ | select payment_method_code , party_phone from parties where party_email = 'enrico09@example.com'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the emails of parties with the most popular party form. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select parties.party_email from parties join party_forms on parties.party_id = party_forms.party_id where party_forms.form_id = ( select form_id from party_forms group by form_id order by count ( * ) desc limit 1 )" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the party emails associated with parties that used the party form that is the most common? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ = ( select _ from _ group by _ order by count ( _ ) desc limit _ ) | select parties.party_email from parties join party_forms on parties.party_id = party_forms.party_id where party_forms.form_id = ( select form_id from party_forms group by form_id order by count ( * ) desc limit 1 )" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the name of organizations in order of the date formed. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select organization_name from organizations order by date_formed asc" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of organizations, ordered by the date they were formed, ascending? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select organization_name from organizations order by date_formed asc" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the youngest organization. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select organization_name from organizations order by date_formed desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the organization that was formed most recently? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select organization_name from organizations order by date_formed desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of the latest contact individual of the organization \"Labour Party\". | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select individuals.individual_last_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id join individuals on organization_contact_individuals.individual_id = individuals.individual_id where organizations.organization_name = 'Labour Party' order by organization_contact_individuals.date_contact_to desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the contact individual from the Labour party organization who was contacted most recently? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select individuals.individual_last_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id join individuals on organization_contact_individuals.individual_id = individuals.individual_id where organizations.organization_name = 'Labour Party' order by organization_contact_individuals.date_contact_to desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of the first ever contact person of the organization with the highest UK Vat number. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) order by _ asc limit _ | select individuals.individual_last_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id join individuals on organization_contact_individuals.individual_id = individuals.individual_id where organizations.uk_vat_number = ( select max ( uk_vat_number ) from organizations ) order by organization_contact_individuals.date_contact_to asc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) order by _ asc limit _ | select individuals.individual_last_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id join individuals on organization_contact_individuals.individual_id = individuals.individual_id where organizations.uk_vat_number = ( select max ( uk_vat_number ) from organizations ) order by organization_contact_individuals.date_contact_to asc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many services are there? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from services" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of services. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from services" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find name of the services that has never been used. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select service_name from services except select services.service_name from services join party_services on services.service_id = party_services.service_id" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the services that have never been used? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select service_name from services except select services.service_name from services join party_services on services.service_id = party_services.service_id" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of all the cities and states. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select town_city from addresses union select state_province_county from addresses" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all cities and states? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ union select _ from _ | select town_city from addresses union select state_province_county from addresses" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many cities are there in state \"Colorado\"? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from addresses where state_province_county = 'Colorado'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of cities in the state of Colorado. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from addresses where state_province_county = 'Colorado'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the payment method code used by more than 3 parties. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select payment_method_code from parties group by payment_method_code having count ( * ) > 3" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the payment method codes that have been used by more than 3 parties? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select payment_method_code from parties group by payment_method_code having count ( * ) > 3" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of organizations whose names contain \"Party\". | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select organization_name from organizations where organization_name like '%Party%'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of organizations that contain the word \"Party\"? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select organization_name from organizations where organization_name like '%Party%'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many distinct payment methods are used by parties? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct payment_method_code ) from parties" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different payment method codes used by parties. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct payment_method_code ) from parties" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which is the email of the party that has used the services the most number of times? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select parties.party_email from parties join party_services on parties.party_id = party_services.customer_id group by parties.party_email order by count ( * ) desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the party email that has used party services the greatest number of times. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select parties.party_email from parties join party_services on parties.party_id = party_services.customer_id group by parties.party_email order by count ( * ) desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which state can address \"6862 Kaitlyn Knolls\" possibly be in? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select state_province_county from addresses where line_1_number_building like '%6862 Kaitlyn Knolls%'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\". | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select state_province_county from addresses where line_1_number_building like '%6862 Kaitlyn Knolls%'" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of organization that has the greatest number of contact individuals? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organizations.organization_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id group by organizations.organization_name order by count ( * ) desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the name of the organization which has the most contact individuals. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select organizations.organization_name from organizations join organization_contact_individuals on organizations.organization_id = organization_contact_individuals.organization_id group by organizations.organization_name order by count ( * ) desc limit 1" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the last name of the individuals that have been contact individuals of an organization. | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct individuals.individual_last_name from individuals join organization_contact_individuals on individuals.individual_id = organization_contact_individuals.individual_id" }, { "db_id": "e_government", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names of individuals who have been contact individuals for an organization? | addresses : address_id , line_1_number_building , town_city , zip_postcode , state_province_county , country | services : service_id , service_type_code , service_name , service_descriptio | forms : form_id , form_type_code , service_id , form_number , form_name , form_description | individuals : individual_id , individual_first_name , individual_middle_name , inidividual_phone , individual_email , individual_address , individual_last_name | organizations : organization_id , date_formed , organization_name , uk_vat_number | parties : party_id , payment_method_code , party_phone , party_email | organization_contact_individuals : individual_id , organization_id , date_contact_from , date_contact_to | party_addresses : party_id , address_id , date_address_from , address_type_code , date_address_to | party_forms : party_id , form_id , date_completion_started , form_status_code , date_fully_completed | party_services : booking_id , customer_id , service_id , service_datetime , booking_made_date | forms.service_id = services.service_id | organization_contact_individuals.individual_id = individuals.individual_id | organization_contact_individuals.organization_id = organizations.organization_id | party_addresses.party_id = parties.party_id | party_addresses.address_id = addresses.address_id | party_forms.form_id = forms.form_id | party_forms.party_id = parties.party_id | party_services.customer_id = parties.party_id | party_services.service_id = services.service_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct individuals.individual_last_name from individuals join organization_contact_individuals on individuals.individual_id = organization_contact_individuals.individual_id" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many drivers are there? | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from driver" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, home city, and age for all drivers. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ | select name , home_city , age from driver" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the party and the number of drivers in each party. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select party , count ( * ) from driver group by party" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name of drivers in descending order of age. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select name from driver order by age desc" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all different home cities. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct home_city from driver" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the home city with the most number of drivers. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select home_city from driver group by home_city order by count ( * ) desc limit 1" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the party with drivers from Hartford and drivers older than 40. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ | select party from driver where home_city = 'Hartford' and age > 40" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show home city where at least two drivers older than 40 are from. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select home_city from driver where age > 40 group by home_city having count ( * ) >= 2" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all home cities except for those having a driver older than 40. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select home_city from driver except select home_city from driver where age > 40" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of the drivers without a school bus. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from driver where driver_id not in ( select driver_id from school_bus )" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the types of schools that have two schools. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select type from school group by type having count ( * ) = 2" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the school name and driver name for all school buses. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ | select school.school , driver.name from school_bus join school on school_bus.school_id = school.school_id join driver on school_bus.driver_id = driver.driver_id" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum, minimum and average years spent working on a school bus? | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( years_working ) , min ( years_working ) , avg ( years_working ) from school_bus" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the school name and type for schools without a school bus. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select school , type from school where school_id not in ( select school_id from school_bus )" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the type of school and the number of buses for each type. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select school.type , count ( * ) from school_bus join school on school_bus.school_id = school.school_id group by school.type" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many drivers are from Hartford city or younger than 40? | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from driver where home_city = 'Hartford' or age < 40" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List names for drivers from Hartford city and younger than 40. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ where _ | select name from driver where home_city = 'Hartford' and age < 40" }, { "db_id": "school_bus", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: find the name of driver who is driving the school bus with the longest working history. | driver : driver_id , name , party , home_city , age | school : school_id , grade , school , location , type | school_bus : school_id , driver_id , years_working , if_full_time | school_bus.driver_id = driver.driver_id | school_bus.school_id = school.school_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select driver.name from driver join school_bus on driver.driver_id = school_bus.driver_id order by years_working desc limit 1" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many flights have a velocity larger than 200? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from flight where velocity > 200" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the vehicle flight number, date and pilot of all the flights, ordered by altitude. | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select vehicle_flight_number , date , pilot from flight order by altitude asc" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the id, country, city and name of the airports ordered alphabetically by the name. | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ order by _ asc | select id , country , city , name from airport order by name asc" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is maximum group equity shareholding of the companies? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect max ( _ ) from _ | select max ( group_equity_shareholding ) from operate_company" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the velocity of the pilot named 'Thompson'? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( velocity ) from flight where pilot = 'Thompson'" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and types of the companies that have ever operated a flight? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ | select operate_company.name , operate_company.type from operate_company join flight on operate_company.id = flight.company_id" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the airports which are not in the country 'Iceland'? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ where _ | select name from airport where country != 'Iceland'" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct types of the companies that have operated any flights with velocity less than 200? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct operate_company.type from operate_company join flight on operate_company.id = flight.company_id where flight.velocity < 200" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of the companies that operated more than one flight? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select operate_company.id , operate_company.name from operate_company join flight on operate_company.id = flight.company_id group by operate_company.id having count ( * ) > 1" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id, name and IATA code of the airport that had most number of flights? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airport.id , airport.name , airport.iata from airport join flight on airport.id = flight.airport_id group by flight.id order by count ( * ) desc limit 1" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct flight.pilot from airport join flight on airport.id = flight.airport_id where airport.country = 'United States' or airport.name = 'Billund Airport'" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common company type, and how many are there? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select type , count ( * ) from operate_company group by type order by count ( * ) desc limit 1" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airports haven't the pilot 'Thompson' driven an aircraft? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from airport where id not in ( select airport_id from flight where pilot = 'Thompson' )" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities. | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select flight.pilot from operate_company join flight on operate_company.id = flight.company_id where operate_company.principal_activities = 'Cargo' intersect select flight.pilot from operate_company join flight on operate_company.id = flight.company_id where operate_company.principal_activities = 'Catering services'" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which of the airport names contains the word 'international'? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from airport where name like '%international%'" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many companies operates airlines in each airport? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select airport.id , count ( * ) from operate_company join flight on operate_company.id = flight.company_id join airport on flight.airport_id = airport.id group by airport.id" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: how many airports are there in each country? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , country from airport group by country" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: which countries have more than 2 airports? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select country from airport group by country having count ( * ) > 2" }, { "db_id": "flight_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: which pilot is in charge of the most number of flights? | airport : id , city , country , iata , icao , name | operate_company : id , name , type , principal_activities , incorporated_in , group_equity_shareholding | flight : id , vehicle_flight_number , date , pilot , velocity , altitude , airport_id , company_id | flight.company_id = operate_company.id | flight.airport_id = airport.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select pilot from flight group by pilot order by count ( * ) desc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many accounts do we have? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of accounts. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from accounts" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all account ids and account details. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select account_id , account_details from accounts" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and details of all accounts? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select account_id , account_details from accounts" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many statements do we have? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from statements" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of statements. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from statements" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all statement ids and statement details. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select statement_id , statement_details from statements" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and details of all statements? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select statement_id , statement_details from statements" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show statement id, statement detail, account detail for accounts. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select accounts.statement_id , statements.statement_details , accounts.account_details from accounts join statements on accounts.statement_id = statements.statement_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the statement ids, statement details, and account details, for all accounts? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select accounts.statement_id , statements.statement_details , accounts.account_details from accounts join statements on accounts.statement_id = statements.statement_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all statement id and the number of accounts for each statement. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select statement_id , count ( * ) from accounts group by statement_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different statement ids on accounts, and the number of accounts for each? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select statement_id , count ( * ) from accounts group by statement_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the statement id and the statement detail for the statement with most number of accounts. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select accounts.statement_id , statements.statement_details from accounts join statements on accounts.statement_id = statements.statement_id group by accounts.statement_id order by count ( * ) desc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the statement id and statement detail for the statement that has the most corresponding accounts? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select accounts.statement_id , statements.statement_details from accounts join statements on accounts.statement_id = statements.statement_id group by accounts.statement_id order by count ( * ) desc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from documents" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from documents" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_code , document_name , document_description from documents where document_name = 'Noel CV' or document_name = 'King Book'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_code , document_name , document_description from documents where document_name = 'Noel CV' or document_name = 'King Book'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids and names of all documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select document_id , document_name from documents" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names for each of the documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select document_id , document_name from documents" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find names and ids of all documents with document type code BK. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_name , document_id from documents where document_type_code = 'BK'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and ids of documents that have the type code BK? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_name , document_id from documents where document_type_code = 'BK'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents are with document type code BK for each product id? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , project_id from documents where document_type_code = 'BK' group by project_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of documents with the type code BK that correspond to each product id. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , project_id from documents where document_type_code = 'BK' group by project_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the document name and the document date for all documents on project with details 'Graph Database project'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_name , document_date from documents join projects on documents.project_id = projects.project_id where projects.project_details = 'Graph Database project'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and dates for documents corresponding to project that has the details 'Graph Database project'? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_name , document_date from documents join projects on documents.project_id = projects.project_id where projects.project_details = 'Graph Database project'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show project ids and the number of documents in each project. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select project_id , count ( * ) from documents group by project_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents correspond with each project id? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select project_id , count ( * ) from documents group by project_id" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the project with least number of documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select project_id from documents group by project_id order by count ( * ) asc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the id of the project that has the fewest corresponding documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select project_id from documents group by project_id order by count ( * ) asc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids for projects with at least 2 documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select project_id from documents group by project_id having count ( * ) >= 2" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are project ids of projects that have 2 or more corresponding documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select project_id from documents group by project_id having count ( * ) >= 2" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List document type codes and the number of documents in each code. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select document_type_code , count ( * ) from documents group by document_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents are there of each type? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select document_type_code , count ( * ) from documents group by document_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the document type code with most number of documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select document_type_code from documents group by document_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the code of the document type that is most common. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select document_type_code from documents group by document_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the document type code with fewer than 3 documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) < _ | select document_type_code from documents group by document_type_code having count ( * ) < 3" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes corresponding to document types for which there are less than 3 documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) < _ | select document_type_code from documents group by document_type_code having count ( * ) < 3" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select statements.statement_details , documents.document_name from statements join documents on statements.statement_id = documents.document_id where statements.statement_details = 'Private Project'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select statements.statement_details , documents.document_name from statements join documents on statements.statement_id = documents.document_id where statements.statement_details = 'Private Project'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all document type codes, document type names, document type descriptions. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select document_type_code , document_type_name , document_type_description from ref_document_types" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the codes, names, and descriptions of the different document types? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select document_type_code , document_type_name , document_type_description from ref_document_types" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the document type description for document type named Film? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_description from ref_document_types where document_type_name = 'Film'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the description of the document type name 'Film'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_type_description from ref_document_types where document_type_name = 'Film'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the document type name and the document type description and creation date for all the documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select ref_document_types.document_type_name , ref_document_types.document_type_description , documents.document_date from ref_document_types join documents on ref_document_types.document_type_code = documents.document_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the type name, type description, and date of creation for each document. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select ref_document_types.document_type_name , ref_document_types.document_type_description , documents.document_date from ref_document_types join documents on ref_document_types.document_type_code = documents.document_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of projects. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from projects" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many projects are there? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from projects" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List ids and details for all projects. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select project_id , project_details from projects" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and details for each project? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select project_id , project_details from projects" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the project id and detail for the project with at least two documents? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select projects.project_id , projects.project_details from projects join documents on projects.project_id = documents.project_id group by projects.project_id having count ( * ) > 2" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the ids and details corresponding to projects for which there are more than two documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select projects.project_id , projects.project_details from projects join documents on projects.project_id = documents.project_id group by projects.project_id having count ( * ) > 2" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the project detail for the project with document \"King Book\"? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select projects.project_details from projects join documents on projects.project_id = documents.project_id where documents.document_name = 'King Book'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the details of the project with the document name 'King Book'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select projects.project_details from projects join documents on projects.project_id = documents.project_id where documents.document_name = 'King Book'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many budget types do we have? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_budget_codes" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of budget codes. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from ref_budget_codes" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all budget type codes and descriptions. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select budget_type_code , budget_type_description from ref_budget_codes" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the type codes and descriptions of each budget type? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select budget_type_code , budget_type_description from ref_budget_codes" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the description for the budget type with code ORG? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select budget_type_description from ref_budget_codes where budget_type_code = 'ORG'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the description of the budget type that has the code ORG. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select budget_type_description from ref_budget_codes where budget_type_code = 'ORG'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents have expenses? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from documents_with_expenses" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of documents with expenses. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from documents_with_expenses" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the document ids for the budget type code 'SF'? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_id from documents_with_expenses where budget_type_code = 'SF'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the ids of documents with expenses that have the budget code 'SF'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select document_id from documents_with_expenses where budget_type_code = 'SF'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the budget type code and description and the corresponding document id. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select ref_budget_codes.budget_type_code , ref_budget_codes.budget_type_description , documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the budget type codes, budget type descriptions and document ids for documents with expenses. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ | select ref_budget_codes.budget_type_code , ref_budget_codes.budget_type_description , documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all documents with budget types described as 'Government'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code where ref_budget_codes.budget_type_description = 'Government'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the ids for documents that have the budget description 'Government'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ | select documents_with_expenses.document_id from documents_with_expenses join ref_budget_codes on documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code where ref_budget_codes.budget_type_description = 'Government'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show budget type codes and the number of documents in each budget type. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select budget_type_code , count ( * ) from documents_with_expenses group by budget_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the different budget type codes, and how many documents are there for each? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select budget_type_code , count ( * ) from documents_with_expenses group by budget_type_code" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the budget type code with most number of documents. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select budget_type_code from documents_with_expenses group by budget_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the budget type code that is most common among documents with expenses. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select budget_type_code from documents_with_expenses group by budget_type_code order by count ( * ) desc limit 1" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of documents which don't have expense budgets? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select document_id from documents except select document_id from documents_with_expenses" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the ids of documents that do not have expenses. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select document_id from documents except select document_id from documents_with_expenses" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all documents in type CV without expense budgets. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select document_id from documents where document_type_code = 'CV' except select document_id from documents_with_expenses" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of documents with the type code CV that do not have expenses. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ | select document_id from documents where document_type_code = 'CV' except select document_id from documents_with_expenses" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of documents with letter 's' in the name with any expense budgets. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select documents.document_id from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents.document_name like '%s%'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the ids of documents that have expenses and contain the letter s in their names. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select documents.document_id from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents.document_name like '%s%'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many documents do not have any expense? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from documents where document_id not in ( select document_id from documents_with_expenses )" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of documents that do not have expenses. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from documents where document_id not in ( select document_id from documents_with_expenses )" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates for the documents with both 'GV' type and 'SF' type expenses? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'GV' intersect select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'SF'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'GV' intersect select documents.document_date from documents join documents_with_expenses on documents.document_id = documents_with_expenses.document_id where documents_with_expenses.budget_type_code = 'SF'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the account details with the largest value or with value having char '5' in it? | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect max ( _ ) from _ union select _ from _ where _ like _ | select max ( account_details ) from accounts union select account_details from accounts where account_details like '%5%'" }, { "db_id": "cre_Docs_and_Epenses", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the account details with the greatest value, as well as those that include the character 5. | ref_document_types : document_type_code , document_type_name , document_type_description | ref_budget_codes : budget_type_code , budget_type_description | projects : project_id , project_details | documents : document_id , document_type_code , project_id , document_date , document_name , document_description , other_details | statements : statement_id , statement_details | documents_with_expenses : document_id , budget_type_code , document_details | accounts : account_id , statement_id , account_details | documents.project_id = projects.project_id | documents.document_type_code = ref_document_types.document_type_code | statements.statement_id = documents.document_id | documents_with_expenses.document_id = documents.document_id | documents_with_expenses.budget_type_code = ref_budget_codes.budget_type_code | accounts.statement_id = statements.statement_id | \n\n### Response:\n\nselect max ( _ ) from _ union select _ from _ where _ like _ | select max ( account_details ) from accounts union select account_details from accounts where account_details like '%5%'" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total number of scientists. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from scientists" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many scientists are there? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from scientists" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total hours of all projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( hours ) from projects" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of hours for all projects? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect sum ( _ ) from _ | select sum ( hours ) from projects" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different scientists are assigned to any project? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct scientist ) from assignedto" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different scientists assigned to any project. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct scientist ) from assignedto" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of distinct projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct name ) from projects" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different projects are there? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct name ) from projects" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average hours of all projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( hours ) from projects" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average hours across all projects? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( hours ) from projects" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of project that continues for the longest time. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from projects order by hours desc limit 1" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the project with the most hours? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name from projects order by hours desc limit 1" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all projects that are operated longer than the average working hours of all projects. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from projects where hours > ( select avg ( hours ) from projects )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of projects that have taken longer than the average number of hours for all projects? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ > ( select avg ( _ ) from _ ) | select name from projects where hours > ( select avg ( hours ) from projects )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and hours of project that has the most number of scientists. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select projects.name , projects.hours from projects join assignedto on projects.code = assignedto.project group by assignedto.project order by count ( * ) desc limit 1" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and hours for the project which has the most scientists assigned to it? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select projects.name , projects.hours from projects join assignedto on projects.code = assignedto.project group by assignedto.project order by count ( * ) desc limit 1" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the project for which a scientist whose name contains 'Smith' is assigned to. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ like _ | select projects.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name like '%Smith%'" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the project that has a scientist assigned to it whose name contains 'Smith'? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ like _ | select projects.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name like '%Smith%'" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( projects.hours ) from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name = 'Michael Rogers' or scientists.name = 'Carol Smith'" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( projects.hours ) from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where scientists.name = 'Michael Rogers' or scientists.name = 'Carol Smith'" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of projects that require between 100 and 300 hours of work. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from projects where hours between 100 and 300" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of projects that require between 100 and 300 hours? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from projects where hours between 100 and 300" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'Matter of Time' intersect select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'A Puzzling Parallax'" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'Matter of Time' intersect select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.name = 'A Puzzling Parallax'" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all scientists sorted in alphabetical order. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from scientists order by name asc" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all the scientists in alphabetical order? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc | select name from scientists order by name asc" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of scientists involved for each project name. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , projects.name from projects join assignedto on projects.code = assignedto.project group by projects.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the naems of all the projects, and how many scientists were assigned to each of them? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , projects.name from projects join assignedto on projects.code = assignedto.project group by projects.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of scientists involved for the projects that require more than 300 hours. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , projects.name from projects join assignedto on projects.code = assignedto.project where projects.hours > 300 group by projects.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of projects that require more than 300 hours, and how many scientists are assigned to each? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ | select count ( * ) , projects.name from projects join assignedto on projects.code = assignedto.project where projects.hours > 300 group by projects.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of projects which each scientist is working on and scientist's name. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , scientists.name from scientists join assignedto on scientists.ssn = assignedto.scientist group by scientists.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the scientists, and how many projects are each of them working on? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , scientists.name from scientists join assignedto on scientists.ssn = assignedto.scientist group by scientists.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the SSN and name of scientists who are assigned to the project with the longest hours. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select scientists.ssn , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the SSN and names of scientists working on the project with the most hours? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select scientists.ssn , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of scientists who are assigned to some project. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ | select scientists.name from assignedto join scientists on assignedto.scientist = scientists.ssn" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of scientists who are assigned to any project? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ | select scientists.name from assignedto join scientists on assignedto.scientist = scientists.ssn" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Select the project names which are not assigned yet. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from projects where code not in ( select project from assignedto )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of projects that have not been assigned? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from projects where code not in ( select project from assignedto )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of scientists who are not assigned to any project. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from scientists where ssn not in ( select scientist from assignedto )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of scientists who have not been assigned a project? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from scientists where ssn not in ( select scientist from assignedto )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of scientists who are not assigned to any project. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from scientists where ssn not in ( select scientist from assignedto )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many scientists do not have any projects assigned to them? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from scientists where ssn not in ( select scientist from assignedto )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of scientists who are not working on the project with the highest hours. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ = ( select max ( _ ) from _ ) | select name from scientists except select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of scientists who are not working on the project with the most hours? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ = ( select max ( _ ) from _ ) | select name from scientists except select scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select max ( hours ) from projects )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select scientists.name , projects.name , projects.hours from scientists join assignedto on scientists.ssn = assignedto.scientist join projects on assignedto.project = projects.code order by projects.name asc , scientists.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select scientists.name , projects.name , projects.hours from scientists join assignedto on scientists.ssn = assignedto.scientist join projects on assignedto.project = projects.code order by projects.name asc , scientists.name" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it. | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ ) | select projects.name , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select min ( hours ) from projects )" }, { "db_id": "scientist_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it? | scientists : ssn , name | projects : code , name , hours | assignedto : scientist , project | assignedto.project = projects.code | assignedto.scientist = scientists.ssn | \n\n### Response:\n\nselect _ from _ where _ = ( select min ( _ ) from _ ) | select projects.name , scientists.name from assignedto join projects on assignedto.project = projects.code join scientists on assignedto.scientist = scientists.ssn where projects.hours = ( select min ( hours ) from projects )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the highest rated wine? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from wine order by score asc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the name of the wine with the highest score. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name from wine order by score asc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which winery is the wine that has the highest score from? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select winery from wine order by score asc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the winery at which the wine with the highest score was made? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select winery from wine order by score asc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all wines produced in 2008. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select name from wine where year = '2008'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all wines produced in 2008? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select name from wine where year = '2008'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the grapes and appelations of all wines. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ | select grape , appelation from wine" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the grapes and appelations of each wine? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ | select grape , appelation from wine" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and scores of all wines. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ | select name , score from wine" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and scores of all wines? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ | select name , score from wine" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the area and county of all appelations. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ | select area , county from appellations" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the areas and counties for all appelations? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ | select area , county from appellations" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the prices of wines produced before the year of 2010? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select price from wine where year < 2010" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the prices of wines produced before 2010. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select price from wine where year < 2010" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct wines that have scores higher than 90. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select name from wine where score > 90" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines with scores higher than 90? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select name from wine where score > 90" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct wines that are made of red color grape. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines made from red grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of all distinct wines that have appellations in North Coast area. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'North Coast'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of wines that have appellations in the North Coast area? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'North Coast'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many wines are produced at Robert Biale winery? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from wine where winery = 'Robert Biale'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of wines produced at Robert Biale winery. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from wine where winery = 'Robert Biale'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many appelations are in Napa Country? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from appellations where county = 'Napa'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of appelations in Napa County. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from appellations where county = 'Napa'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the average prices of wines that are produced by appelations in Sonoma County. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Sonoma'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price of wines produced in appelations in Sonoma County? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Sonoma'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and scores of wines that are made of white color grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select wine.name , wine.score from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names and scores of wines made from white grapes. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select wine.name , wine.score from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'Central Coast' and wine.year < 2005" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( wine.price ) from appellations join wine on appellations.appelation = wine.appelation where appellations.area = 'Central Coast' and wine.year < 2005" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the the grape whose white color grapes are used to produce wines with scores higher than 90. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct grapes.grape from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White' and wine.score > 90" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the white grape used to produce wines with scores above 90. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct grapes.grape from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White' and wine.score > 90" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the wines that have prices higher than 50 and made of Red color grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red' and wine.price > 50" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines made from red grapes and with prices above 50? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select wine.name from grapes join wine on grapes.grape = wine.grape where grapes.color = 'Red' and wine.price > 50" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the wines that have prices lower than 50 and have appelations in Monterey county? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Monterey' and wine.price < 50" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the neames of wines with prices below 50 and with appelations in Monterey county. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ | select wine.name from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Monterey' and wine.price < 50" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the numbers of wines for different grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , grape from wine group by grape" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many wines are there for each grape? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , grape from wine group by grape" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average prices of wines for different years? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( price ) , year from wine group by year" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average prices of wines for each each? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( price ) , year from wine group by year" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct names of all wines that have prices higher than some wines from John Anthony winery. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct name from wine where price > ( select min ( price ) from wine where winery = 'John Anthony' )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names of wines with prices higher than any wine from John Anthony winery. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ > ( select min ( _ ) from _ where _ ) | select distinct name from wine where price > ( select min ( price ) from wine where winery = 'John Anthony' )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct wines in alphabetical order. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from wine order by name asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines, sorted in alphabetical order? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from wine order by name asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct wines ordered by price. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from wine order by price asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines, sorted by price ascending? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct name from wine order by price asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the area of the appelation that produces the highest number of wines before the year of 2010? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ having _ order by count ( _ ) desc limit _ | select appellations.area from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having wine.year < 2010 order by count ( * ) desc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the area for the appelation which produced the most wines prior to 2010? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ having _ order by count ( _ ) desc limit _ | select appellations.area from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having wine.year < 2010 order by count ( * ) desc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the color of the grape whose wine products has the highest average price? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select grapes.color from grapes join wine on grapes.grape = wine.grape group by wine.grape order by avg ( price ) desc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the color of the grape whose wine products have the highest average price? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ order by avg ( _ ) desc limit _ | select grapes.color from grapes join wine on grapes.grape = wine.grape group by wine.grape order by avg ( price ) desc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct names of wines produced before the year of 2000 or after the year of 2010. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct name from wine where year < 2000 or year > 2010" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the distinct names of wines made before 2000 or after 2010. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct name from wine where year < 2000 or year > 2010" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct winery of wines having price between 50 and 100. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ between _ and _ | select distinct winery from wine where price between 50 and 100" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct wineries which produce wines costing between 50 and 100? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect distinct _ from _ where _ between _ and _ | select distinct winery from wine where price between 50 and 100" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( price ) , avg ( cases ) from wine where year = 2009 and grape = 'Zinfandel'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the average price and case of wines made from Zinfandel grapes in the year 2009. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) from _ where _ | select avg ( price ) , avg ( cases ) from wine where year = 2009 and grape = 'Zinfandel'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum price and score of wines produced by St. Helena appelation? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect max ( _ ) , max ( _ ) from _ where _ | select max ( price ) , max ( score ) from wine where appelation = 'St. Helena'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the maximum price and score for wines produced in the appelation St. Helena. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect max ( _ ) , max ( _ ) from _ where _ | select max ( price ) , max ( score ) from wine where appelation = 'St. Helena'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum price and score of wines in each year? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect max ( _ ) , max ( _ ) , _ from _ group by _ | select max ( price ) , max ( score ) , year from wine group by year" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the maximum price and score of wines for each year? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect max ( _ ) , max ( _ ) , _ from _ group by _ | select max ( price ) , max ( score ) , year from wine group by year" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average price and score of wines grouped by appelation? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) , _ from _ group by _ | select avg ( price ) , avg ( score ) , appelation from wine group by appelation" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the average price and score of wines for each appelation? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) , avg ( _ ) , _ from _ group by _ | select avg ( price ) , avg ( score ) , appelation from wine group by appelation" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the wineries that have at least four wines. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select winery from wine group by winery having count ( * ) >= 4" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which wineries produce at least four wines? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select winery from wine group by winery having count ( * ) >= 4" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the country of all appelations who have at most three wines. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select appellations.county from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having count ( * ) <= 3" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries for appelations with at most 3 wines? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select appellations.county from appellations join wine on appellations.appelation = wine.appelation group by wine.appelation having count ( * ) <= 3" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines whose production year are before the year of all wines by Brander winery? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select name from wine where year < ( select min ( year ) from wine where winery = 'Brander' )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines produced before any wine from the Brander winery? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ < ( select min ( _ ) from _ where _ ) | select name from wine where year < ( select min ( year ) from wine where winery = 'Brander' )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of wines that are more expensive then all wines made in the year 2006? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select name from wine where price > ( select max ( price ) from wine where year = 2006 )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give the names of wines with prices above any wine produced in 2006. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ > ( select max ( _ ) from _ where _ ) | select name from wine where price > ( select max ( price ) from wine where year = 2006 )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the top 3 wineries with the greatest number of wines made of white color grapes. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select wine.winery from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White' group by wine.winery order by count ( * ) desc limit 3" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which 3 wineries produce the most wines made from white grapes? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select wine.winery from grapes join wine on grapes.grape = wine.grape where grapes.color = 'White' group by wine.winery order by count ( * ) desc limit 3" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the grape, winery and year of the wines whose price is bigger than 100 ordered by year. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select grape , winery , year from wine where price > 100 order by year asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the grapes, wineries and years for wines with price higher than 100, sorted by year? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select grape , winery , year from wine where price > 100 order by year asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the grape, appelation and name of wines whose score is higher than 93 ordered by Name. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select grape , appelation , name from wine where score > 93 order by name asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the grapes, appelations, and wines with scores above 93, sorted by Name? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select grape , appelation , name from wine where score > 93 order by name asc" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the appelations that produce wines after the year of 2008 but not in Central Coast area. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select appelation from wine where year > 2008 except select appelation from appellations where area = 'Central Coast'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the appelations for wines produced after 2008 but not in the Central Coast area? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ except select _ from _ where _ | select appelation from wine where year > 2008 except select appelation from appellations where area = 'Central Coast'" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average price of wines that are not produced from Sonoma county. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ where _ ) | select avg ( price ) from wine where appelation not in ( select appellations.appelation from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Sonoma' )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price for wines not produced in Sonoma county? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect avg ( _ ) from _ where _ not in ( select _ from _ where _ ) | select avg ( price ) from wine where appelation not in ( select appellations.appelation from appellations join wine on appellations.appelation = wine.appelation where appellations.county = 'Sonoma' )" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the county where produces the most number of wines with score higher than 90. | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select appellations.county from appellations join wine on appellations.appelation = wine.appelation where wine.score > 90 group by appellations.county order by count ( * ) desc limit 1" }, { "db_id": "wine_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the county that produces the most wines scoring higher than 90? | grapes : id , grape , color | appellations : no , appelation , county , state , area , isava | wine : no , grape , winery , appelation , state , name , year , price , score , cases , drink | wine.appelation = appellations.appelation | wine.grape = grapes.grape | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select appellations.county from appellations join wine on appellations.appelation = wine.appelation where wine.score > 90 group by appellations.county order by count ( * ) desc limit 1" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many train stations are there? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from station" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, location, and number of platforms for all stations. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ | select name , location , number_of_platforms from station" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all locations of train stations? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct location from station" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and total passengers for all train stations not in London. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ where _ | select name , total_passengers from station where location != 'London'" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names and main services for train stations that have the top three total number of passengers. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , main_services from station order by total_passengers desc limit 3" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average and maximum number of total passengers for train stations in London or Glasgow? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) from _ where _ | select avg ( total_passengers ) , max ( total_passengers ) from station where location = 'London' or location = 'Glasgow'" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all locations and the total number of platforms and passengers for all train stations in each location. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ , sum ( _ ) , sum ( _ ) from _ group by _ | select location , sum ( number_of_platforms ) , sum ( total_passengers ) from station group by location" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct location from station where number_of_platforms >= 15 and total_passengers > 25" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all locations which don't have a train station with at least 15 platforms. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select location from station except select location from station where number_of_platforms >= 15" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the location with most number of train stations. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select location from station group by location order by count ( * ) desc limit 1" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name, time, and service for all trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ | select name , time , service from train" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of trains | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from train" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the name and service for all trains in order by time. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select name , service from train order by time asc" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the station name and number of trains in each station. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select station.name , count ( * ) from train_station join station on train_station.station_id = station.station_id group by train_station.station_id" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: show the train name and station name for each train. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ | select station.name , train.name from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all train names and times in stations in London in descending order by train time. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc | select train.name , train.time from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id where station.location = 'London' order by train.time desc" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the station name with greatest number of trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select station.name from train_station join station on train_station.station_id = station.station_id group by train_station.station_id order by count ( * ) desc limit 1" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the station name with at least two trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select station.name from train_station join station on train_station.station_id = station.station_id group by train_station.station_id having count ( * ) >= 2" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all locations with only 1 station. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select location from station group by location having count ( * ) = 1" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show station names without any trains. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ ) | select name from station where station_id not in ( select station_id from train_station )" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the stations which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains? | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select station.name from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id where train.name = 'Ananthapuri Express' intersect select station.name from train_station join station on train_station.station_id = station.station_id join train on train.train_id = train_station.train_id where train.name = 'Guruvayur Express'" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the trains that do not pass any station located in London. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ where _ not in ( select _ from _ where _ ) | select train.name from train_station join train on train_station.train_id = train.train_id where train_station.station_id not in ( select station.station_id from train_station join station on train_station.station_id = station.station_id where station.location = 'London' )" }, { "db_id": "train_station", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names and locations of all stations ordered by their yearly entry exit and interchange amounts. | station : station_id , name , annual_entry_exit , annual_interchanges , total_passengers , location , main_services , number_of_platforms | train : train_id , name , time , service | train_station : train_id , station_id | train_station.station_id = station.station_id | train_station.train_id = train.train_id | \n\n### Response:\n\nselect _ from _ order by _ asc , _ | select name , location from station order by annual_entry_exit asc , annual_interchanges" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all vehicle id | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ | select vehicle_id from vehicles" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of all vehicles? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ | select vehicle_id from vehicles" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many vehicle in total? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from vehicles" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many vehicles exist? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from vehicles" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the detail of vehicle with id 1. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select vehicle_details from vehicles where vehicle_id = 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the details of the car with id 1? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select vehicle_details from vehicles where vehicle_id = 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first name middle name and last name of all staff. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ | select first_name , middle_name , last_name from staff" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first, middle, and last names of all staff? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ | select first_name , middle_name , last_name from staff" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the birthday of the staff member with first name as Janessa and last name as Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_birth from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the date of birth for the staff member named Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_birth from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the staff member with first name as Janessa and last name as Sawayn join the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_joined_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the staff member named Janessa Sawayn join the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_joined_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the staff member with first name as Janessa and last name as Sawayn leave the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_left_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did the staff member Janessa Sawayn leave the company? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_left_staff from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many staff have the first name Ludie? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from staff where first_name = 'Ludie'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees have a first name of Ludie? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from staff where first_name = 'Ludie'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the nickname of staff with first name as Janessa and last name as Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select nickname from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the nickname of the employee named Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select nickname from staff where first_name = 'Janessa' and last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many staff in total? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from staff" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees are there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from staff" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city does staff with first name as Janessa and last name as Sawayn live? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.city from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In what city does Janessa Sawayn live? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.city from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which country and state does staff with first name as Janessa and last name as Sawayn lived? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.country , addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which country and state does Janessa Sawayn live? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.country , addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( lessons.lesson_time ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How long is the total lesson time took by the customer named Rylan Goodwin? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( lessons.lesson_time ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the zip code of staff with first name as Janessa and last name as Sawayn lived? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.zip_postcode from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the zip code of the hosue of the employee named Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.zip_postcode from addresses join staff on addresses.address_id = staff.staff_address_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many staff live in state Georgia? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from addresses where state_province_county = 'Georgia'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many employees live in Georgia? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from addresses where state_province_county = 'Georgia'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find out the first name and last name of staff lived in city Damianfort. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select staff.first_name , staff.last_name from addresses join staff on addresses.address_id = staff.staff_address_id where addresses.city = 'Damianfort'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of all employees who live in the city Damianfort? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select staff.first_name , staff.last_name from addresses join staff on addresses.address_id = staff.staff_address_id where addresses.city = 'Damianfort'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city lives most of staffs? List the city name and number of staffs. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select addresses.city , count ( * ) from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.city order by count ( * ) desc limit 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which city do the most employees live and how many of them live there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select addresses.city , count ( * ) from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.city order by count ( * ) desc limit 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the states which have between 2 to 4 staffs living there. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) between _ and _ | select addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.state_province_county having count ( * ) between 2 and 4" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the states that have 2 to 4 employees living there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) between _ and _ | select addresses.state_province_county from addresses join staff on addresses.address_id = staff.staff_address_id group by addresses.state_province_county having count ( * ) between 2 and 4" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first name and last name of all customers. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ | select first_name , last_name from customers" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names for all customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ | select first_name , last_name from customers" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List email address and birthday of customer whose first name as Carole. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select email_address , date_of_birth from customers where first_name = 'Carole'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the email addresses and date of births for all customers who have a first name of Carole? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select email_address , date_of_birth from customers where first_name = 'Carole'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List phone number and email address of customer with more than 2000 outstanding balance. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select phone_number , email_address from customers where amount_outstanding > 2000" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select phone_number , email_address from customers where amount_outstanding > 2000" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_status_code , cell_mobile_phone_number , email_address from customers where first_name = 'Marina' or last_name = 'Kohler'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select customer_status_code , cell_mobile_phone_number , email_address from customers where first_name = 'Marina' or last_name = 'Kohler'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When are the birthdays of customer who are classified as 'Good Customer' status? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_birth from customers where customer_status_code = 'Good Customer'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the date of birth of every customer whose status code is 'Good Customer'? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_of_birth from customers where customer_status_code = 'Good Customer'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did customer with first name as Carole and last name as Bernhard became a customer? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_became_customer from customers where first_name = 'Carole' and last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When did Carole Bernhard first become a customer? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select date_became_customer from customers where first_name = 'Carole' and last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers in total? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers are there? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from customers" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all customer status codes and the number of customers having each status code. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customer_status_code , count ( * ) from customers group by customer_status_code" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each customer status code, how many customers are classified that way? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select customer_status_code , count ( * ) from customers group by customer_status_code" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer status code has least number of customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customer_status_code from customers group by customer_status_code order by count ( * ) asc limit 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the status code with the least number of customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select customer_status_code from customers group by customer_status_code order by count ( * ) asc limit 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin' and lessons.lesson_status_code = 'Completed'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lessons did the customer Ryan Goodwin complete? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Rylan' and customers.last_name = 'Goodwin' and lessons.lesson_status_code = 'Completed'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is maximum, minimum and average amount of outstanding of customer? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( amount_outstanding ) , min ( amount_outstanding ) , avg ( amount_outstanding ) from customers" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum, minimum, and average amount of money outsanding for all customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect max ( _ ) , min ( _ ) , avg ( _ ) from _ | select max ( amount_outstanding ) , min ( amount_outstanding ) , avg ( amount_outstanding ) from customers" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the first name and last name of customers have the amount of outstanding between 1000 and 3000. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select first_name , last_name from customers where amount_outstanding between 1000 and 3000" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all customers with between 1000 and 3000 dollars outstanding? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select first_name , last_name from customers where amount_outstanding between 1000 and 3000" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List first name and last name of customers lived in city Lockmanfurt. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.first_name , customers.last_name from customers join addresses on customers.customer_address_id = addresses.address_id where addresses.city = 'Lockmanfurt'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all customers who lived in Lockmanfurt? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.first_name , customers.last_name from customers join addresses on customers.customer_address_id = addresses.address_id where addresses.city = 'Lockmanfurt'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which country does customer with first name as Carole and last name as Bernhard lived in? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.country from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the country in which the customer Carole Bernhard lived? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.country from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is zip code of customer with first name as Carole and last name as Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.zip_postcode from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the zip code of the customer Carole Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ | select addresses.zip_postcode from customers join addresses on customers.customer_address_id = addresses.address_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which city does has most number of customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select addresses.city from customers join addresses on customers.customer_address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the city with the most customers? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select addresses.city from customers join addresses on customers.customer_address_id = addresses.address_id group by addresses.city order by count ( * ) desc limit 1" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How much in total does customer with first name as Carole and last name as Bernhard paid? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( customer_payments.amount_payment ) from customer_payments join customers on customer_payments.customer_id = customers.customer_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total amount of moeny paid by the customer Carole Bernhard? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( customer_payments.amount_payment ) from customer_payments join customers on customer_payments.customer_id = customers.customer_id where customers.first_name = 'Carole' and customers.last_name = 'Bernhard'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the number of customers that did not have any payment history. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from customer_payments )" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many customers have no payment histories? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ ) | select count ( * ) from customers where customer_id not in ( select customer_id from customer_payments )" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List first name and last name of customers that have more than 2 payments. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select customers.first_name , customers.last_name from customer_payments join customers on customer_payments.customer_id = customers.customer_id group by customer_payments.customer_id having count ( * ) > 2" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last names of all customers with more than 2 payments? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ | select customers.first_name , customers.last_name from customer_payments join customers on customer_payments.customer_id = customers.customer_id group by customer_payments.customer_id having count ( * ) > 2" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all payment methods and number of payments using each payment methods. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from customer_payments group by payment_method_code" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each payment method, how many payments were made? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select payment_method_code , count ( * ) from customer_payments group by payment_method_code" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lessons were in cancelled state? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from lessons where lesson_status_code = 'Cancelled'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lessons have been cancelled? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from lessons where lesson_status_code = 'Cancelled'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'. | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select lessons.lesson_id from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn' and nickname like '%s%'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ where _ like _ | select lessons.lesson_id from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn' and nickname like '%s%'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lessons taught by staff whose first name has letter 'a' in it? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name like '%a%'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lessons were taught by a staff member whose first name has the letter 'a' in it? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name like '%a%'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( lesson_time ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total time for all lessons taught by Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect sum ( _ ) from _ where _ | select sum ( lesson_time ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is average lesson price taught by staff with first name as Janessa and last name as Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average price for a lesson taught by Janessa Sawayn? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect avg ( _ ) from _ where _ | select avg ( price ) from lessons join staff on lessons.staff_id = staff.staff_id where staff.first_name = 'Janessa' and staff.last_name = 'Sawayn'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lesson does customer with first name Ray took? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Ray'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many lessons did the customer with the first name Ray take? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from lessons join customers on lessons.customer_id = customers.customer_id where customers.first_name = 'Ray'" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which last names are both used by customers and by staff? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select last_name from customers intersect select last_name from staff" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the last names that are used by customers and staff? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select last_name from customers intersect select last_name from staff" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of the staff who did not give any lesson? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select first_name from staff except select staff.first_name from lessons join staff on lessons.staff_id = staff.staff_id" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first name of all employees who do not give any lessons? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ except select _ from _ | select first_name from staff except select staff.first_name from lessons join staff on lessons.staff_id = staff.staff_id" }, { "db_id": "driving_school", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id and detail of the vehicle used in lessons for most of the times? | addresses : address_id , line_1_number_building , city , zip_postcode , state_province_county , country | staff : staff_id , staff_address_id , nickname , first_name , middle_name , last_name , date_of_birth , date_joined_staff , date_left_staff | vehicles : vehicle_id , vehicle_details | customers : customer_id , customer_address_id , customer_status_code , date_became_customer , date_of_birth , first_name , last_name , amount_outstanding , email_address , phone_number , cell_mobile_phone_number | customer_payments : customer_id , datetime_payment , payment_method_code , amount_payment | lessons : lesson_id , customer_id , lesson_status_code , staff_id , vehicle_id , lesson_date , lesson_time , price | staff.staff_address_id = addresses.address_id | customers.customer_address_id = addresses.address_id | customer_payments.customer_id = customers.customer_id | lessons.customer_id = customers.customer_id | lessons.staff_id = staff.staff_id | lessons.vehicle_id = vehicles.vehicle_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select vehicles.vehicle_id , vehicles.vehicle_details from vehicles join lessons on vehicles.vehicle_id = lessons.vehicle_id group by vehicles.vehicle_id order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty do we have? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What ranks do we have for faculty? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect distinct _ from _ | select distinct rank from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the list of distinct ranks for faculty. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect distinct _ from _ | select distinct rank from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the distinct buildings that have faculty rooms. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect distinct _ from _ | select distinct building from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What buildings have faculty offices? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect distinct _ from _ | select distinct building from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the rank, first name, and last name for all the faculty. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ | select rank , fname , lname from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the rank, first name, and last name of the faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ | select rank , fname , lname from faculty" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the first name, last name, and phone number for all female faculty members. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname , phone from faculty where sex = 'F'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name, last name, and phone number of all the female faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname , phone from faculty where sex = 'F'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for all the male faculty. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select facid from faculty where sex = 'M'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the faculty ids of all the male faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select facid from faculty where sex = 'M'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many female Professors do we have? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from faculty where sex = 'F' and rank = 'Professor'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of female Professors we have. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from faculty where sex = 'F' and rank = 'Professor'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the phone, room, and building for the faculty named Jerry Prince. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select phone , room , building from faculty where fname = 'Jerry' and lname = 'Prince'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the phone, room, and building of the faculty member called Jerry Prince? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select phone , room , building from faculty where fname = 'Jerry' and lname = 'Prince'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many Professors are in building NEB? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from faculty where rank = 'Professor' and building = 'NEB'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of Professors who have office in building NEB. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from faculty where rank = 'Professor' and building = 'NEB'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the first name and last name for all the instructors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from faculty where rank = 'Instructor'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and last name of all the instructors? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select fname , lname from faculty where rank = 'Instructor'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the buildings along with the number of faculty members the buildings have. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select building , count ( * ) from faculty group by building" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty members does each building have? List the result with the name of the building. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select building , count ( * ) from faculty group by building" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which building has most faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select building from faculty group by building order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the building that has the largest number of faculty members. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select building from faculty group by building order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the buildings that have at least 10 professors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select building from faculty where rank = 'Professor' group by building having count ( * ) >= 10" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In which buildings are there at least ten professors? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select building from faculty where rank = 'Professor' group by building having count ( * ) >= 10" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each faculty rank, show the number of faculty members who have it. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select rank , count ( * ) from faculty group by rank" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty members do we have for each faculty rank? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select rank , count ( * ) from faculty group by rank" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the ranks and the number of male and female faculty for each rank. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select rank , sex , count ( * ) from faculty group by rank , sex" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty members do we have for each rank and gender? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select rank , sex , count ( * ) from faculty group by rank , sex" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which rank has the smallest number of faculty members? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select rank from faculty group by rank order by count ( * ) asc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the faculty rank that has the least members. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) asc limit _ | select rank from faculty group by rank order by count ( * ) asc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the number of male and female assistant professors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select sex , count ( * ) from faculty where rank = 'AsstProf' group by sex" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many male and female assistant professors do we have? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ where _ group by _ | select sex , count ( * ) from faculty where rank = 'AsstProf' group by sex" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first name and last name of Linda Smith's advisor? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor where student.fname = 'Linda' and student.lname = 'Smith'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Who is the advisor of Linda Smith? Give me the first name and last name. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor where student.fname = 'Linda' and student.lname = 'Smith'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of students whose advisors are professors. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select student.stuid from faculty join student on faculty.facid = student.advisor where faculty.rank = 'Professor'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students have professors as their advisors? Find their student ids. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select student.stuid from faculty join student on faculty.facid = student.advisor where faculty.rank = 'Professor'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show first name and last name for all the students advised by Michael Goodrich. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from faculty join student on faculty.facid = student.advisor where faculty.fname = 'Michael' and faculty.lname = 'Goodrich'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students are advised by Michael Goodrich? Give me their first and last names. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select student.fname , student.lname from faculty join student on faculty.facid = student.advisor where faculty.fname = 'Michael' and faculty.lname = 'Goodrich'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the faculty id of each faculty member, along with the number of students he or she advises. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select faculty.facid , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.facid" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the faculty id and the number of students each faculty has? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select faculty.facid , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.facid" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the faculty ranks and the number of students advised by each rank. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select faculty.rank , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.rank" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many students are advised by each rank of faculty? List the rank and the number of students. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select faculty.rank , count ( * ) from faculty join student on faculty.facid = student.advisor group by faculty.rank" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first and last name of the faculty who has the most students? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor group by faculty.facid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the the first and last name of the faculty who advises the most students. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.fname , faculty.lname from faculty join student on faculty.facid = student.advisor group by faculty.facid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids for all the faculty members who have at least 2 students. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select faculty.facid from faculty join student on faculty.facid = student.advisor group by faculty.facid having count ( * ) >= 2" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which faculty members advise two ore more students? Give me their faculty ids. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select faculty.facid from faculty join student on faculty.facid = student.advisor group by faculty.facid having count ( * ) >= 2" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show ids for the faculty members who don't advise any student. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select facid from faculty except select advisor from student" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the faculty members who do not advise any student. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select facid from faculty except select advisor from student" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What activities do we have? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ | select activity_name from activity" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all the activities we have. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ | select activity_name from activity" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many activities do we have? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from activity" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of activities available. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from activity" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty members participate in an activity? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct facid ) from faculty_participates_in" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the number of faculty members who participate in an activity | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct facid ) from faculty_participates_in" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of the faculty who don't participate in any activity. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select facid from faculty except select facid from faculty_participates_in" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which faculty do not participate in any activity? Find their faculty ids. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select facid from faculty except select facid from faculty_participates_in" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of all the faculty members who participate in an activity and advise a student. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select facid from faculty_participates_in intersect select advisor from student" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are ids of the faculty members who not only participate in an activity but also advise a student. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ intersect select _ from _ | select facid from faculty_participates_in intersect select advisor from student" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many activities does Mark Giuliano participate in? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid where faculty.fname = 'Mark' and faculty.lname = 'Giuliano'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of activities Mark Giuliano is involved in. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid where faculty.fname = 'Mark' and faculty.lname = 'Giuliano'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the names of all the activities Mark Giuliano participates in. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select activity.activity_name from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on activity.actid = faculty_participates_in.actid where faculty.fname = 'Mark' and faculty.lname = 'Giuliano'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the activities Mark Giuliano is involved in | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ | select activity.activity_name from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on activity.actid = faculty_participates_in.actid where faculty.fname = 'Mark' and faculty.lname = 'Giuliano'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) , _ from _ group by _ | select faculty.fname , faculty.lname , count ( * ) , faculty.facid from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid group by faculty.facid" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) , _ from _ group by _ | select faculty.fname , faculty.lname , count ( * ) , faculty.facid from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid group by faculty.facid" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all the activity names and the number of faculty involved in each activity. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select activity.activity_name , count ( * ) from activity join faculty_participates_in on activity.actid = faculty_participates_in.actid group by activity.actid" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many faculty members participate in each activity? Return the activity names and the number of faculty members. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select activity.activity_name , count ( * ) from activity join faculty_participates_in on activity.actid = faculty_participates_in.actid group by activity.actid" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the faculty participating in the most activities? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.fname , faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid group by faculty.facid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first and last name of the faculty who is involved in the largest number of activities. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select faculty.fname , faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid group by faculty.facid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the activity that has the most faculty members involved in? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select activity.activity_name from activity join faculty_participates_in on activity.actid = faculty_participates_in.actid group by activity.actid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which activity has the most faculty members participating in? Find the activity name. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select activity.activity_name from activity join faculty_participates_in on activity.actid = faculty_participates_in.actid group by activity.actid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids of the students who don't participate in any activity. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from participates_in" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the students who are not involved in any activity | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ except select _ from _ | select stuid from student except select stuid from participates_in" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the ids for all the students who participate in an activity and are under 20. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ intersect select _ from _ where _ | select stuid from participates_in intersect select stuid from student where age < 20" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids of the students who are under 20 years old and are involved in at least one activity. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ intersect select _ from _ where _ | select stuid from participates_in intersect select stuid from student where age < 20" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the first and last name of the student participating in the most activities? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select student.fname , student.lname from student join participates_in on student.stuid = participates_in.stuid group by student.stuid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Tell me the first and last name of the student who has the most activities. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select student.fname , student.lname from student join participates_in on student.stuid = participates_in.stuid group by student.stuid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the activity with the most students? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select activity.activity_name from activity join participates_in on activity.actid = participates_in.actid group by activity.actid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the activity that has the largest number of student participants. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select activity.activity_name from activity join participates_in on activity.actid = participates_in.actid group by activity.actid order by count ( * ) desc limit 1" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of the faculty members who are playing Canoeing or Kayaking. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Canoeing' or activity.activity_name = 'Kayaking'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which faculty members are playing either Canoeing or Kayaking? Tell me their first names. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Canoeing' or activity.activity_name = 'Kayaking'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of professors who are not playing Canoeing or Kayaking. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ except select distinct _ from _ where _ | select lname from faculty where rank = 'Professor' except select distinct faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Canoeing' or activity.activity_name = 'Kayaking'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of the professors who do not play Canoeing or Kayaking as activities? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ except select distinct _ from _ where _ | select lname from faculty where rank = 'Professor' except select distinct faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Canoeing' or activity.activity_name = 'Kayaking'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the first names of the faculty members who participate in Canoeing and Kayaking. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Canoeing' intersect select faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Kayaking'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the first names of the faculty members playing both Canoeing and Kayaking? | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Canoeing' intersect select faculty.lname from faculty join faculty_participates_in on faculty.facid = faculty_participates_in.facid join activity on faculty_participates_in.actid = faculty_participates_in.actid where activity.activity_name = 'Kayaking'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of the students who participate in Canoeing and Kayaking. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select participates_in.stuid from participates_in join activity on activity.actid = activity.actid where activity.activity_name = 'Canoeing' intersect select participates_in.stuid from participates_in join activity on activity.actid = activity.actid where activity.activity_name = 'Kayaking'" }, { "db_id": "activity_1", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids. | activity : actid , activity_name | participates_in : stuid , actid | faculty_participates_in : facid , actid | student : stuid , lname , fname , age , sex , major , advisor , city_code | faculty : facid , lname , fname , rank , sex , phone , room , building | participates_in.actid = activity.actid | participates_in.stuid = student.stuid | faculty_participates_in.actid = activity.actid | faculty_participates_in.facid = faculty.facid | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select participates_in.stuid from participates_in join activity on activity.actid = activity.actid where activity.activity_name = 'Canoeing' intersect select participates_in.stuid from participates_in join activity on activity.actid = activity.actid where activity.activity_name = 'Kayaking'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the airport in the city of Goroka. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ | select name from airports where city = 'Goroka'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the airports in the city of Goroka? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ | select name from airports where city = 'Goroka'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, city, country, and altitude (or elevation) of the airports in the city of New York. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ | select name , city , country , elevation from airports where city = 'New York'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, city, country, and elevation for every airport in the city of New York? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ | select name , city , country , elevation from airports where city = 'New York'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airlines are there? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from airlines" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of airlines? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from airlines" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airlines does Russia has? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airlines where country = 'Russia'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of airlines based in Russia? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airlines where country = 'Russia'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum elevation of all airports in the country of Iceland? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( elevation ) from airports where country = 'Iceland'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the highest elevation of an airport in the country of Iceland? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect max ( _ ) from _ where _ | select max ( elevation ) from airports where country = 'Iceland'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the airports located in Cuba or Argentina. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ | select name from airports where country = 'Cuba' or country = 'Argentina'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all airports in Cuba or Argentina? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ | select name from airports where country = 'Cuba' or country = 'Argentina'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the country of the airlines whose name starts with 'Orbit'. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ like _ | select country from airlines where name like 'Orbit%'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries of all airlines whose names start with Orbit? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ like _ | select country from airlines where name like 'Orbit%'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of airports whose altitude is between -50 and 50. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from airports where elevation between -50 and 50" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all airports whose elevation is between -50 and 50? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ between _ and _ | select name from airports where elevation between -50 and 50" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which country is the airport that has the highest altitude located in? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select country from airports order by elevation desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the country of the airport with the highest elevation? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select country from airports order by elevation desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of airports whose name contain the word 'International'. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from airports where name like '%International%'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airports' names have the word Interanation in them? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ like _ | select count ( * ) from airports where name like '%International%'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many different cities do have some airport in the country of Greenland? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct city ) from airports where country = 'Greenland'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: In how many cities are there airports in the country of Greenland? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct city ) from airports where country = 'Greenland'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of routes operated by American Airlines. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airlines join routes on airlines.alid = routes.alid where airlines.name = 'American Airlines'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many routes does American Airlines operate? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airlines join routes on airlines.alid = routes.alid where airlines.name = 'American Airlines'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of routes whose destination airports are in Canada. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airports join routes on airports.apid = routes.dst_apid where country = 'Canada'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many routes end in a Canadian airport? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airports join routes on airports.apid = routes.dst_apid where country = 'Canada'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, city, and country of the airport that has the lowest altitude. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , city , country from airports order by elevation asc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, city, and country of the airport with the lowest altitude? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select name , city , country from airports order by elevation asc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name, city, and country of the airport that has the highest latitude. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , city , country from airports order by elevation desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name, city, and country of the airport with the highest elevation? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select name , city , country from airports order by elevation desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and city of the airport which is the destination of the most number of routes. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airports.name , airports.city , routes.dst_apid from airports join routes on airports.apid = routes.dst_apid group by routes.dst_apid order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and city of the airport that the most routes end at? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airports.name , airports.city , routes.dst_apid from airports join routes on airports.apid = routes.dst_apid group by routes.dst_apid order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the top 10 airlines that operate the most number of routes. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airlines.name , routes.alid from airlines join routes on airlines.alid = routes.alid group by routes.alid order by count ( * ) desc limit 10" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For the airline ids with the top 10 most routes operated, what are their names? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airlines.name , routes.alid from airlines join routes on airlines.alid = routes.alid group by routes.alid order by count ( * ) desc limit 10" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name and city of the airport which is the source for the most number of flight routes. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airports.name , airports.city , routes.src_apid from airports join routes on airports.apid = routes.src_apid group by routes.src_apid order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name and city of the airport from most of the routes start? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airports.name , airports.city , routes.src_apid from airports join routes on airports.apid = routes.src_apid group by routes.src_apid order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of different airports which are the destinations of the American Airlines. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct dst_apid ) from airlines join routes on airlines.alid = routes.alid where airlines.name = 'American Airlines'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of different different airports that are destinations for American Airlines? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( distinct _ ) from _ where _ | select count ( distinct dst_apid ) from airlines join routes on airlines.alid = routes.alid where airlines.name = 'American Airlines'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which countries has the most number of airlines? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select country from airlines group by country order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the country with the most number of home airlines? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select country from airlines group by country order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which countries has the most number of airlines whose active status is 'Y'? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from airlines where active = 'Y' group by country order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the countries with the most airlines whose active status is Y? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select country from airlines where active = 'Y' group by country order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all countries and their number of airlines in the descending order of number of airlines. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select country , count ( * ) from airlines group by country order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airlines operate out of each country in descending order? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc | select country , count ( * ) from airlines group by country order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airports are there per country? Order the countries by decreasing number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , country from airports group by country order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of airports per country, ordered from most to least? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , country from airports group by country order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airports are there per city in the United States? Order the cities by decreasing number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ order by count ( _ ) desc | select count ( * ) , city from airports where country = 'United States' group by city order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many airports are there per city in the US ordered from most to least? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ where _ group by _ order by count ( _ ) desc | select count ( * ) , city from airports where country = 'United States' group by city order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the cities with more than 3 airports in the United States. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) > _ | select city from airports where country = 'United States' group by city having count ( * ) > 3" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of cities in the United States with more than 3 airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) > _ | select city from airports where country = 'United States' group by city having count ( * ) > 3" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many cities are there that have more than 3 airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ group by _ having count ( _ ) > _ ) | select count ( * ) from ( select city from airports group by city having count ( * ) > 3 )" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the count of cities with more than 3 airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from ( select _ from _ group by _ having count ( _ ) > _ ) | select count ( * ) from ( select city from airports group by city having count ( * ) > 3 )" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the cities which have more than one airport and number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select city , count ( * ) from airports group by city having count ( * ) > 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of all cities with more than one airport and how many airports do they have? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) > _ | select city , count ( * ) from airports group by city having count ( * ) > 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the cities which have more than 2 airports sorted by the number of airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ order by count ( _ ) asc | select city from airports group by city having count ( * ) > 2 order by count ( * ) asc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the cities that have more than 2 airports sorted by number of airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) > _ order by count ( _ ) asc | select city from airports group by city having count ( * ) > 2 order by count ( * ) asc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of routes for each source airport and the airport name. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each airport name, how many routes start at that airport? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of routes and airport name for each source airport, order the results by decreasing number of routes. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each airport name, how many routes start at that airport, ordered from most to least? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ order by count ( _ ) desc | select count ( * ) , airports.name from airports join routes on airports.apid = routes.src_apid group by airports.name order by count ( * ) desc" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the average elevation of all airports for each country. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( elevation ) , country from airports group by country" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each country, what is the average elevation of that country's airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect avg ( _ ) , _ from _ group by _ | select avg ( elevation ) , country from airports group by country" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the cities which have exactly two airports. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select city from airports group by city having count ( * ) = 2" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the cities with exactly two airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ | select city from airports group by city having count ( * ) = 2" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each country and airline name, how many routes are there? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select airlines.country , airlines.name , count ( * ) from airlines join routes on airlines.alid = routes.alid group by airlines.country , airlines.name" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the total number of routes for each country and airline in that country? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select airlines.country , airlines.name , count ( * ) from airlines join routes on airlines.alid = routes.alid group by airlines.country , airlines.name" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of routes with destination airports in Italy. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid where airports.country = 'Italy'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of routes whose destinations are Italian airports? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid where airports.country = 'Italy'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid join airlines on routes.alid = airlines.alid where airports.country = 'Italy' and airlines.name = 'American Airlines'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of routes operated by the airline American Airlines whose destinations are in Italy? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from routes join airports on routes.dst_apid = airports.apid join airlines on routes.alid = airlines.alid where airports.country = 'Italy' and airlines.name = 'American Airlines'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of routes that have destination John F Kennedy International Airport. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airports join routes on airports.apid = routes.dst_apid where airports.name = 'John F Kennedy International Airport'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the number of routes that end at John F Kennedy International Airport? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from airports join routes on airports.apid = routes.dst_apid where airports.name = 'John F Kennedy International Airport'" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the number of routes from the United States to Canada. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ in ( select _ from _ where _ ) and _ in ( select _ from _ where _ ) | select count ( * ) from routes where dst_apid in ( select apid from airports where country = 'Canada' ) and src_apid in ( select apid from airports where country = 'United States' )" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many routes go from the United States to Canada? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect count ( _ ) from _ where _ in ( select _ from _ where _ ) and _ in ( select _ from _ where _ ) | select count ( * ) from routes where dst_apid in ( select apid from airports where country = 'Canada' ) and src_apid in ( select apid from airports where country = 'United States' )" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of routes whose source and destination airports are in the United States. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) and _ in ( select _ from _ where _ ) | select rid from routes where dst_apid in ( select apid from airports where country = 'United States' ) and src_apid in ( select apid from airports where country = 'United States' )" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the routes whose source and destination airports are in the United States? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ in ( select _ from _ where _ ) and _ in ( select _ from _ where _ ) | select rid from routes where dst_apid in ( select apid from airports where country = 'United States' ) and src_apid in ( select apid from airports where country = 'United States' )" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of airline which runs the most number of routes. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airlines.name from airlines join routes on airlines.alid = routes.alid group by airlines.name order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the airline with the most routes? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select airlines.name from airlines join routes on airlines.alid = routes.alid group by airlines.name order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the busiest source airport that runs most number of routes in China. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select airports.name from airports join routes on airports.apid = routes.src_apid where airports.country = 'China' group by airports.name order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the airport with the most number of routes that start in China? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select airports.name from airports join routes on airports.apid = routes.src_apid where airports.country = 'China' group by airports.name order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the busiest destination airport that runs most number of routes in China. | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select airports.name from airports join routes on airports.apid = routes.dst_apid where airports.country = 'China' group by airports.name order by count ( * ) desc limit 1" }, { "db_id": "flight_4", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the airport that is the destination of the most number of routes that start in China? | routes : rid , dst_apid , dst_ap , src_apid , src_ap , alid , airline , codeshare | airports : apid , name , city , country , x , y , elevation , iata , icao | airlines : alid , name , iata , icao , callsign , country , active | routes.alid = airlines.alid | routes.src_apid = airports.apid | routes.dst_apid = airports.apid | \n\n### Response:\n\nselect _ from _ where _ group by _ order by count ( _ ) desc limit _ | select airports.name from airports join routes on airports.apid = routes.dst_apid where airports.country = 'China' group by airports.name order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the most recent order? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select order_id from orders order by date_order_placed desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the order made most recently. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ desc limit _ | select order_id from orders order by date_order_placed desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: what are the order id and customer id of the oldest order? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select order_id , customer_id from orders order by date_order_placed asc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the order id and customer id associated with the oldest order. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ order by _ asc limit _ | select order_id , customer_id from orders order by date_order_placed asc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the order whose shipment tracking number is \"3452\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_id from shipments where shipment_tracking_number = '3452'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which order's shipment tracking number is \"3452\"? Give me the id of the order. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_id from shipments where shipment_tracking_number = '3452'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of all the order items whose product id is 11. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_item_id from order_items where product_id = 11" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find all the order items whose product id is 11. What are the order item ids? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_item_id from order_items where product_id = 11" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name of all the distinct customers who have orders with status \"Packing\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Packing'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have orders with status \"Packing\"? Give me the customer names. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Packing'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the details of all the distinct customers who have orders with status \"On Road\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_details from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct customers who have orders with status \"On Road\"? Give me the customer details? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct customers.customer_details from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer who has the most orders? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customer made the most orders? Find the customer name. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the customer id of the customer who has the most orders? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the customer who made the most orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of id and status of orders which belong to the customer named \"Jeramie\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.order_id , orders.order_status from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which orders are made by the customer named \"Jeramie\"? Give me the order ids and status. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.order_id , orders.order_status from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the dates of orders which belong to the customer named \"Jeramie\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.date_order_placed from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the dates of the orders made by the customer named \"Jeramie\"? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.date_order_placed from customers join orders on customers.customer_id = orders.customer_id where customers.customer_name = 'Jeramie'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.date_order_placed >= '2009-01-01' and orders.date_order_placed <= '2010-01-01'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers made orders between 2009-01-01 and 2010-01-01? Find their names. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.date_order_placed >= '2009-01-01' and orders.date_order_placed <= '2010-01-01'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct order_items.product_id from orders join order_items on orders.order_id = order_items.order_id where orders.date_order_placed >= '1975-01-01' and orders.date_order_placed <= '1976-01-01'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01?? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct order_items.product_id from orders join order_items on orders.order_id = order_items.order_id where orders.date_order_placed >= '1975-01-01' and orders.date_order_placed <= '1976-01-01'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the names of the customers who have order status both \"On Road\" and \"Shipped\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer names. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the customers who have order status both \"On Road\" and \"Shipped\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer ids. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'On Road' intersect select customers.customer_id from customers join orders on customers.customer_id = orders.customer_id where orders.order_status = 'Shipped'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: When was the order placed whose shipment tracking number is 3452? Give me the date. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.shipment_tracking_number = 3452" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On which day was the order placed whose shipment tracking number is 3452? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.shipment_tracking_number = 3452" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the placement date of the order whose invoice number is 10? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.invoice_number = 10" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: On what day was the order with invoice number 10 placed? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select orders.date_order_placed from orders join shipments on orders.order_id = shipments.order_id where shipments.invoice_number = 10" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the count and id of each product in all the orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , products.product_id from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each product, return its id and the number of times it was ordered. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect count ( _ ) , _ from _ group by _ | select count ( * ) , products.product_id from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name and count of each product in all orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each product, show its name and the number of times it was ordered. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select products.product_name , count ( * ) from orders join order_items join products on orders.order_id = order_items.order_id and order_items.product_id = products.product_id group by products.product_id" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the ids of orders which are shipped after 2000-01-01. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_id from shipments where shipment_date > '2000-01-01'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which orders have shipment after 2000-01-01? Give me the order ids. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select order_id from shipments where shipment_date > '2000-01-01'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the id of the order which is shipped most recently. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select order_id from shipments where shipment_date = ( select max ( shipment_date ) from shipments )" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which order has the most recent shipment? Give me the order id. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ = ( select max ( _ ) from _ ) | select order_id from shipments where shipment_date = ( select max ( shipment_date ) from shipments )" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of all distinct products in alphabetical order. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct product_name from products order by product_name asc" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Sort all the distinct products in alphabetical order. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct product_name from products order by product_name asc" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the ids of all distinct orders ordered by placed date. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct order_id from orders order by date_order_placed asc" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are ids of the all distinct orders, sorted by placement date? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ order by _ asc | select distinct order_id from orders order by date_order_placed asc" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id of the order which has the most items? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select orders.order_id from orders join order_items on orders.order_id = order_items.order_id group by orders.order_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which order deals with the most items? Return the order id. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select orders.order_id from orders join order_items on orders.order_id = order_items.order_id group by orders.order_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the name of the customer who has the largest number of orders? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the customer who made the most orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select customers.customer_name from customers join orders on customers.customer_id = orders.customer_id group by customers.customer_id order by count ( * ) desc limit 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select invoice_number from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the invoice numbers created before 1989-09-03 or after 2007-12-25? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ where _ | select invoice_number from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct invoice_details from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct invoice_details from invoices where invoice_date < '1989-09-03' or invoice_date > '2007-12-25'" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: For each customer who has at least two orders, find the customer name and number of orders made. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) >= _ | select customers.customer_name , count ( * ) from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) >= 2" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have made at least two orders? Give me each customer name and number of orders made. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ having count ( _ ) >= _ | select customers.customer_name , count ( * ) from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) >= 2" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Find the name of the customers who have at most two orders. | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select customers.customer_name from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) <= 2" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the customers who have made two or less orders? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) <= _ | select customers.customer_name from orders join customers on orders.customer_id = customers.customer_id group by customers.customer_id having count ( * ) <= 2" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of the customers who have once bought product \"food\". | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ and _ where _ group by _ having count ( _ ) >= _ | select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the customers who bought product \"food\" at least once? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ and _ where _ group by _ having count ( _ ) >= _ | select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\"). | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ and _ where _ group by _ having count ( _ ) >= _ | select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where order_items.order_item_status = 'Cancel' and products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1" }, { "db_id": "tracking_orders", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which customers have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")? | customers : customer_id , customer_name , customer_details | invoices : invoice_number , invoice_date , invoice_details | orders : order_id , customer_id , order_status , date_order_placed , order_details | products : product_id , product_name , product_details | order_items : order_item_id , product_id , order_id , order_item_status , order_item_details | shipments : shipment_id , order_id , invoice_number , shipment_tracking_number , shipment_date , other_shipment_details | shipment_items : shipment_id , order_item_id | orders.customer_id = customers.customer_id | order_items.product_id = products.product_id | order_items.order_id = orders.order_id | shipments.invoice_number = invoices.invoice_number | shipments.order_id = orders.order_id | shipment_items.shipment_id = shipments.shipment_id | shipment_items.order_item_id = order_items.order_item_id | \n\n### Response:\n\nselect _ from _ and _ where _ group by _ having count ( _ ) >= _ | select customers.customer_name from customers join orders join order_items join products on customers.customer_id = orders.customer_id and orders.order_id = order_items.order_id and order_items.product_id = products.product_id where order_items.order_item_status = 'Cancel' and products.product_name = 'food' group by customers.customer_id having count ( * ) >= 1" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many architects are female? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ | select count ( * ) from architect where gender = 'female'" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List the name, nationality and id of all male architects ordered by their names lexicographically. | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select name , nationality , id from architect where gender = 'male' order by name asc" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the maximum length in meters for the bridges and what are the architects' names? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect max ( _ ) , _ from _ | select max ( bridge.length_meters ) , architect.name from bridge join architect on bridge.architect_id = architect.id" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average length in feet of the bridges? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect avg ( _ ) from _ | select avg ( length_feet ) from bridge" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names and year of construction for the mills of 'Grondzeiler' type? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ where _ | select name , built_year from mill where type = 'Grondzeiler'" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct names and nationalities of the architects who have ever built a mill? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect distinct _ from _ | select distinct architect.name , architect.nationality from architect join mill on architect.id = mill.architect_id" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the names of the mills which are not located in 'Donceel'? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ where _ | select name from mill where location != 'Donceel'" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct types of mills that are built by American or Canadian architects? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct mill.type from mill join architect on mill.architect_id = architect.id where architect.nationality = 'American' or architect.nationality = 'Canadian'" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids and names of the architects who built at least 3 bridges ? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) >= _ | select architect.id , architect.name from architect join bridge on architect.id = bridge.architect_id group by architect.id having count ( * ) >= 3" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the id, name and nationality of the architect who built most mills? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select architect.id , architect.name , architect.nationality from architect join mill on architect.id = mill.architect_id group by architect.id order by count ( * ) desc limit 1" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the ids, names and genders of the architects who built two bridges or one mill? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ group by _ having count ( _ ) = _ union select _ from _ group by _ having count ( _ ) = _ | select architect.id , architect.name , architect.gender from architect join bridge on architect.id = mill.architect_id group by architect.id having count ( * ) = 2 union select architect.id , architect.name , architect.gender from architect join mill on architect.id = mill.architect_id group by architect.id having count ( * ) = 1" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ where _ | select location from bridge where name = 'Kolob Arch' or name = 'Rainbow Bridge'" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which of the mill names contains the french word 'Moulin'? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ where _ like _ | select name from mill where name like '%Moulin%'" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect distinct _ from _ where _ | select distinct mill.name from mill join architect on mill.architect_id = architect.id join bridge on bridge.architect_id = architect.id where bridge.length_meters > 80" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the most common mill type, and how many are there? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ order by count ( _ ) desc limit _ | select type , count ( * ) from mill group by type order by count ( * ) desc limit 1" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many architects haven't built a mill before year 1850? | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect count ( _ ) from _ where _ not in ( select _ from _ where _ ) | select count ( * ) from architect where id not in ( select architect_id from mill where built_year < 1850 )" }, { "db_id": "architecture", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length. | architect : id , name , nationality , gender | bridge : architect_id , id , name , location , length_meters , length_feet | mill : architect_id , id , location , name , type , built_year , notes | bridge.architect_id = architect.id | mill.architect_id = architect.id | \n\n### Response:\n\nselect _ from _ where _ order by _ asc | select bridge.name from bridge join architect on bridge.architect_id = architect.id where architect.nationality = 'American' order by bridge.length_feet asc" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many book clubs are there? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from book_club" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of book clubs. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect count ( _ ) from _ | select count ( * ) from book_club" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: show the titles, and authors or editors for all books made after the year 1989. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select book_title , author_or_editor from book_club where year > 1989" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles and authors or editors that correspond to books made after 1989? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select book_title , author_or_editor from book_club where year > 1989" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all distinct publishers for books. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct publisher from book_club" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the different book publishers? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect distinct _ from _ | select distinct publisher from book_club" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the years, book titles, and publishers for all books, in descending order by year. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select year , book_title , publisher from book_club order by year desc" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the years, titles, and publishers for all books, ordered by year descending? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ order by _ desc | select year , book_title , publisher from book_club order by year desc" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all publishers and the number of books for each publisher. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select publisher , count ( * ) from book_club group by publisher" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many books are there for each publisher? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select publisher , count ( * ) from book_club group by publisher" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the publisher with most number of books? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select publisher from book_club group by publisher order by count ( * ) desc limit 1" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the publisher that has published the most books. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ group by _ order by count ( _ ) desc limit _ | select publisher from book_club group by publisher order by count ( * ) desc limit 1" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all book categories and the number of books in each category. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select category , count ( * ) from book_club group by category" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many books fall into each category? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ , count ( _ ) from _ group by _ | select category , count ( * ) from book_club group by category" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List categories that have at least two books after year 1989. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select category from book_club where year > 1989 group by category having count ( * ) >= 2" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What categories have two or more corresponding books that were made after 1989? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ group by _ having count ( _ ) >= _ | select category from book_club where year > 1989 group by category having count ( * ) >= 2" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show publishers with a book published in 1989 and a book in 1990. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select publisher from book_club where year = 1989 intersect select publisher from book_club where year = 1990" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the publishers who have published a book in both 1989 and 1990? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select publisher from book_club where year = 1989 intersect select publisher from book_club where year = 1990" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all publishers which do not have a book in 1989. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select publisher from book_club except select publisher from book_club where year = 1989" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which publishers did not publish a book in 1989? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ except select _ from _ where _ | select publisher from book_club except select publisher from book_club where year = 1989" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all movie titles, years, and directors, ordered by budget. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select title , year , director from movie order by budget_million asc" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles, years, and directors of all movies, ordered by budget in millions? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ order by _ asc | select title , year , director from movie order by budget_million asc" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: How many movie directors are there? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct director ) from movie" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Count the number of different directors. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect count ( distinct _ ) from _ | select count ( distinct director ) from movie" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the title and director for the movie with highest worldwide gross in the year 2000 or before? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select title , director from movie where year <= 2000 order by gross_worldwide desc limit 1" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ order by _ desc limit _ | select title , director from movie where year <= 2000 order by gross_worldwide desc limit 1" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all director names who have a movie in both year 1999 and 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select director from movie where year = 2000 intersect select director from movie where year = 1999" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which directors had a movie both in the year 1999 and 2000? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ intersect select _ from _ where _ | select director from movie where year = 2000 intersect select director from movie where year = 1999" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all director names who have a movie in the year 1999 or 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select director from movie where year = 1999 or year = 2000" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Which directors had a movie in either 1999 or 2000? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select director from movie where year = 1999 or year = 2000" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What is the average, maximum, and minimum budget for all movies before 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , min ( _ ) from _ where _ | select avg ( budget_million ) , max ( budget_million ) , min ( budget_million ) from movie where year < 2000" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Return the average, maximum, and minimum budgets in millions for movies made before the year 2000. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect avg ( _ ) , max ( _ ) , min ( _ ) from _ where _ | select avg ( budget_million ) , max ( budget_million ) , min ( budget_million ) from movie where year < 2000" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: List all company names with a book published by Alyson. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select culture_company.company_name from culture_company join book_club on culture_company.book_club_id = book_club.book_club_id where book_club.publisher = 'Alyson'" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all the company names that have a book published by Alyson? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select culture_company.company_name from culture_company join book_club on culture_company.book_club_id = book_club.book_club_id where book_club.publisher = 'Alyson'" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show the movie titles and book titles for all companies in China. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select movie.title , book_club.book_title from movie join culture_company on movie.movie_id = culture_company.movie_id join book_club on book_club.book_club_id = culture_company.book_club_id where culture_company.incorporated_in = 'China'" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are the titles of movies and books corresponding to companies incorporated in China? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select movie.title , book_club.book_title from movie join culture_company on movie.movie_id = culture_company.movie_id join book_club on book_club.book_club_id = culture_company.book_club_id where culture_company.incorporated_in = 'China'" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: Show all company names with a movie directed in year 1999. | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select culture_company.company_name from movie join culture_company on movie.movie_id = culture_company.movie_id where movie.year = 1999" }, { "db_id": "culture_company", "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\n\nConvert text to sql: What are all company names that have a corresponding movie directed in the year 1999? | book_club : book_club_id , year , author_or_editor , book_title , publisher , category , result | movie : movie_id , title , year , director , budget_million , gross_worldwide | culture_company : company_name , type , incorporated_in , group_equity_shareholding , book_club_id , movie_id | culture_company.movie_id = movie.movie_id | culture_company.book_club_id = book_club.book_club_id | \n\n### Response:\n\nselect _ from _ where _ | select culture_company.company_name from movie join culture_company on movie.movie_id = culture_company.movie_id where movie.year = 1999" } ]